String Encoding (UTF8)

Posted By: Vorick

String Encoding (UTF8) - 07/07/09 05:49

Hi there,

I'm using a UTF8-encoded SQLite-Database (with GSTSQLite) in my current project. I need this encoding, because my project involves different languages. Now, when I'm pulling varchata data from the database into a string, I get e.g. "ü" instead of the german umlaut "ü". As a web developer I know this problem quite well, but in regards of Lite-C I have no idea how to handle this.

And just for background information: I'm currently displaying my strings in a panel digit with the font definition "Arial#14b".

Is there an equivalent to the php function "utf8_decode()"? How can I solve my problem?

Any hints are appreciated.

Patrick
Posted By: Vorick

Re: String Encoding (UTF8) - 07/07/09 17:15

Okay, after some digging I stumbled upon this Thread... Wish I had found it yesterday. ;-)

/close
Posted By: MMike

Re: String Encoding (UTF8) - 07/09/09 19:24

did you solved??

when i read UTF8 notepad texts it gives those wierd things, wish i could convert UTF8 to ANSCI IN RUNTIME. Since im using an http reader, that recieves textsof html, UTF8
Posted By: Vorick

Re: String Encoding (UTF8) - 07/24/09 14:20

Sorry for the late reply.

I didn't really solve this problem. I am know generating my database entries from within the engine to avoid the problem.
Posted By: MMike

Re: String Encoding (UTF8) - 07/24/09 21:15

to bad..
because i have a similar problem.
What im doing is downloading a html page, and then read the its UTF encoded.. and the html is not outputing correclty.
Posted By: Vorick

Re: String Encoding (UTF8) - 07/25/09 08:44

Maybe you can solve your problem the other way round (although I didn't try it):

If you're generating your html via php, you could try to utf8_decode/utf8_encode your html output to get 3dgs-readable data. This is something I have to try out myself in a couple of weeks, when trying to update Rankings from a webserver, but I'm not quite there yet.
Posted By: MMike

Re: String Encoding (UTF8) - 07/26/09 21:36

hum its not php sometimes..
The thing is that this reads RSS feeds for example, and other locak weather conditions, that will show up. and those sites aren't php. :\
saving as txt or html is not the solution.

i though got a program in c++ that converts a input file into any encoded i want.

So this is the process..
Request HTML -> save HTML to something.txt or .gs then, Call a comand EXECUTE to execute the program converter with parameters like silent( no windows) and the output name.. and the conversion encoding format.. --> then finaly read that last ffile, that is the GS format to read.

If you need that program i can give you, it took me alot to found such on the web for free..
© 2024 lite-C Forums