Not sure what you code is doing, and you aren’t showing how you are getting 
your 'é' into SQLite, but U+FFFD is the standard character for malformed data, 
so something somewhere is complaining about converting something into UTF-8. 

Also, you CAN’T have a UTF-8 value like 0xC3A9, as that is not a byte value. 
U+00E9 expressed in UTF-8 would be 0xC3, 0xA9 (Two separate bytes), if you try 
to talk about it in some bigger word you are no longer talking UTF-8, and 
introducing all sorts of machine specifies (Big vs Little Endian, word size, 
etc).

> On Sep 23, 2019, at 12:53 PM, Pierre Clouthier 
> <pclout...@progenygenealogy.com> wrote:
> 
> Can anyone explain how to write UTF-8 in SQLite on the Mac?
> 
> We use this statement:
> 
>   sqlite3_exec("PRAGMA encoding = \"UTF-8\";") 
> This works fine on Windows, but on macOS the data is not being stored 
> correctly.
> 
> The data to be written (passed to SQLite), is formatted in UTF-8.
> 
> For example, 'é' is U+00E9, which in UTF-8 is 0xC3A9. However, in the macOS 
> version of the database, it is converted to 0xEFBFBD, which is U+FFFD, which 
> doesn't make sense.
> 
> -- 
> Progeny Genealogy Inc. 902–681–3102
> Progeny helps you tell the Story of Your Family ™
> 
> 
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to