On Wed, Nov 03, 2004 at 11:55:02AM +0100, Mirar @ Pike developers forum wrote:
No. It's *always* true.
OK, you are right. That is true. But:
s1 = string_to_utf8("\x1234\x1234"); s2 = string_to_utf8(s1);
s1 != s2 // Right? Obviously.
So what do we have in case if:
- User provides UTF-8 string as input (s1) - It gets encoded with string_to_utf8() - Result (s2) is passed to another application, which expects UTF-8 and don't use any conversion (operates directly on UTF-8 strings - comparisons, etc).
So... Unless this another application (in our case sqlite or someting that uses same db with sqlite) will use appropriate conversion, right?
I.e. - I store some (UTF-8 encoded) string into column, it will be encoded second time (in glue), then I retrieve this from perl-sqlite (since I use UTF-8 encoded value directly, I don't decode it) and (say) compare to some constant (also UTF-8). It won't match, or?
(Well, it could happen that I am crazy and completely miss something - but I don't see where :)
Regards, /Al