master131 / TTActivator-lang

0 stars 0 forks source link

Change language structure (separator and carriage return) #4

Open bovirus opened 4 years ago

bovirus commented 4 years ago

To avoid misunderstand and misalignment about translation file I propsoe two changes in the structure of .xcsv etxt file

Separator for string fields

Currently you are using comma to separate string. I bleieve that is quite common to use comma ind ecription than can create problem (add nore than two colmns for strings in CSV). I propose to change the separator using tabs or other character.

carriage retrun in text string

Other problem about string alignment between is the use of carriage return (new line). If iyour program is in C you can use instead physical CR a text like "1n" that is used as newline.

master131 commented 4 years ago

Excel does not support a custom separator with UTF-8 BOM encoding at the same time. https://stackoverflow.com/questions/20395699/sep-statement-breaks-utf8-bom-in-csv-file-which-is-generated-by-xsl

I could switch it to a tab and force UTF-16 encoding as a workaround but it doesn't make it any more readable. Ideally these should be edited in Excel or a proper CSV editor.

As for the carriage returns, some strings are formatted in a very specific way for display purposes. These strings & translations go into XML files which do not use escape characters like "\r", "\n", etc.

bovirus commented 4 years ago

@master131

Infact for me Excel is not the right tool to manage CSV file with Unicode.

And Excel if not freeware program (not all user can have this).

For me the best tool for manage UTF-8/UTF-16 CSV files are

very usefull to show and edit strings

But for me the use of carriage return and "," as separator can create misunderstanding and create error in string layout also if you use the right tool to edit.