?

Log in

No account? Create an account
Weird characters and codepages - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Weird characters and codepages [Feb. 27th, 2003|01:19 pm]
LiveJournal Client Discussions

lj_clients

[pyran]
So I'm developing a client using C#, and I'm running into this weird problem: some international characters are coming out rather oddly. For example, a bunch of e's with accents and i's with accents comes out like this:

éêëìíîï

(I have no idea if this will come out right, so I'm also putting in what the output was supposed to be in case the above line gets re-messed up.)

éêëìíîï

Anyway, I'm told this is a code page issue, but I'm not sure about anything beyond that. Has anyone run into this, and if so, any suggestions on how to get around it?
linkReply

Comments:
[User Picture]From: rahaeli
2003-02-27 01:38 pm (UTC)
LJ uses Unicode (utf-8 encoding). You're probably running into problems with that.
(Reply) (Thread)
[User Picture]From: pyran
2003-02-27 01:41 pm (UTC)
I'm already trying UTF-8, unfortunately.
(Reply) (Parent) (Thread)
[User Picture]From: kvance
2003-02-27 01:38 pm (UTC)
Does C# have some kind of mechanism for converting to another encoding? UTF-8 is what you want.
(Reply) (Thread)
[User Picture]From: pyran
2003-02-27 01:40 pm (UTC)
I'm already encoding using UTF-8. I'm also URL encoding everything before it hits the querystring.
(Reply) (Parent) (Thread)
[User Picture]From: kvance
2003-02-27 01:51 pm (UTC)
Odd.

And you are identifying your client as ver=1?
(Reply) (Parent) (Thread)
[User Picture]From: pyran
2003-02-27 02:48 pm (UTC)
That's it! I had forgotten about that setting entirely. It works now. Thanks! :-)
(Reply) (Parent) (Thread)
[User Picture]From: pyran
2003-02-27 02:50 pm (UTC)
Here's a question: any idea what wouild happen if you set ver=1 on a client that doesn't use Unicode? I'm just curious.
(Reply) (Parent) (Thread)
[User Picture]From: kvance
2003-02-27 03:53 pm (UTC)
Glad to be of help. If you did that, the characters would go through (since UTF-8 is 8 bit, I doubt anything would be rejected) and your web browser would struggle to render them into whatever random Unicode characters they might generate, or revert back to some default encoding if a character couldn't be resolved. Just a guess though; I only know enough about Unicode to get PalmOS to convert from native encoding to it :)
(Reply) (Parent) (Thread)