We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2471b40 commit ca98109Copy full SHA for ca98109
Source/Common/Core.cpp
@@ -1145,9 +1145,13 @@ int Core::Menu_File_Import_Core(const string &FileName)
1145
//CSV
1146
//Loading data in an array
1147
string Sep=string(1, (char)Buffer[8]);
1148
- List.Separator_Set(1, Sep.c_str());
1149
- List.Write((const char*)Buffer);
+ Ztring ToWrite=Ztring().From_UTF8((const char*)Buffer);
+ if (ToWrite.empty())
1150
+ ToWrite=Ztring().From_ISO_8859_1((const char*)Buffer); //Trying to read as plausible ISO-8859-1
1151
+
1152
delete[] Buffer; Buffer=NULL;
1153
+ List.Separator_Set(1, Sep.c_str());
1154
+ List.Write(ToWrite);
1155
if (List.empty())
1156
throw "--in-core=: not a valid file";
1157
for (size_t Pos=0; Pos<List[0].size(); Pos++)
0 commit comments