in reply to Re^2: Problem displaying unicode for certain websites
in thread Problem displaying unicode for certain websites
But how do I know if a given variable stores a unicode or ascii string?
It contains what you put in it. What did you put in it?
You have strings of (Unicode) characters and strings of bytes.
If the string contains chr(0x2660), it's obviously not a string of bytes. If the string contains chr(0x41), it could be anything. ASCII 'A', the number 65, or something completely different.
If you pass a string with chr(0x41) in it to a function, you're not gonna get much information out of it. What you do is pass a string with something that can't be a byte in it. If it works, you know it's expecting characters.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Problem displaying unicode for certain websites
by Anonymous Monk on Dec 12, 2009 at 11:14 UTC | |
by Anonymous Monk on Dec 12, 2009 at 11:25 UTC | |
by ikegami (Patriarch) on Dec 12, 2009 at 19:04 UTC |