Closed ArcticLampyrid closed 5 years ago
Thank you for the pull request. A concern of using sys.getfilesystemencoding() is that if the system setting isn't correct, it's unclear what the returned value is.. We now decide to always transform the string to utf-8 and have the follwing changes in the next release.
all = ['svm_load_model', 'svm_predict', 'svm_save_model', 'svm_train'] + svm_all + common_all
@@ -21,7 +24,7 @@ def svm_load_model(model_file_name):
Load a LIBSVM model from model_file_name and return.
"""
model = libsvm.svm_load_model(_cstr(model_file_name)) if not model: print("can't open model file %s" % model_file_name) return None @@ -34,7 +37,7 @@ def svm_save_model(model_file_name, model):
Save a LIBSVM model to the file model_file_name. """
libsvm.svm_save_model(_cstr(model_file_name), model)
def svm_train(arg1, arg2=None, arg3=None): """
But this decision will result in the library not being able to access files with non-ascii characters in their names on most Windows systems (and some Linux systems).
The library has no reason to handle errors when the System Settings are incorrect.
@cjlin1