Edited Sqlite Table in MS Excel as csv file in DB Browser column is right aligned and text is changed and can't correct it

Hello - I edited the Sqlite Table in MS Excel as csv file when imported in DB Browser 2 or the 12 columns are right aligned when they are normally left. I’m using a open source music font. Certain character sets are substituted for the music fonts. The upper case X is is substituted as encoded UTF- 8 as “€”. for “X”. The UTF- 8 encoding “€” is dropped displaying “€”. I definitely can’t fix it in the DB Browser and even tried it in my new Valentina Studio Pro. The Xojo debug Textbox says encoding is Nill when it is normally UTF-8. I definitely suspect Microsoft excel is the culprit with their over load automatic embedded spreadsheet tools. How do I fix it? Is there another spreed sheet application that works better? I know there is an open source one.out there forgot what the name is.

You didn’t say which OS you are using.

Excel usually is pretty old-fashioned with encodings - it probably used MacRoman or some IsoLatin.

You fix your data by going back to the original version where you didn’t have the mojibake.

Are they numeric?
Excel will put numbers right aligned… it lives for numbers

Text is left aligned.
If you want numbers to be left aligned when Excel displays them, you need to add a single quote to the left of the string

eg setting as Cell to “Fred” - left aligned
setting a cell to “200” - right aligned
setting a cell to “'200” - left aligned

Excell is a spreadsheet software, not a word processor.

Jeff says it all.

Use WordPad (or TextEdit) and use UTF-8, Tabs to watch the columns and get the text you want.

But since I never used DB Browser, I cannot comment on what they do or do not.

NB: dealing with non ASCII characters is a bit strange. You better edit your text in your Xojo application if the above advice does not meet your needs.

Hello - I’m using Windows 10. I didn’t write this clear enough. The columns that were aligned right lost their UTF-8 encoding after I used Excel to do cvs table editing. I found part of the answer on a Xojo Youtube Video at XDC 2019, speaker Kem Tekinay Decoding Text Encodings. It’s common older version of Sqlite can drop UTF-8 encoding with certain Fonts.

This was my fix code that restore the UTF-8 encoding
TextField.Text = DefineEncoding(rs.Field(“X_Line”).StringValue, Encodings.UTF8)

Take Care
Thanks for your help gang

Anything you get from any outside source will need to have its encoding defined. File, database, socket, whatever. You always, always need to DefineEncoding.

Great advice Thanks Tim