|
|
 |
RE: FN-FORUM: XML encoding problem
date posted 25th July 2005 19:38
[EMAIL REMOVED] wrote:
> On 25 Jul 2005 18:35:05 -0000, Dai Williams
> [EMAIL REMOVED] wrote:
>>=20
>> I have now and it does seem to clear the errors, so thanks, however I
>> am not sure I am clear why - the docs say this "Converts a string
>> with ISO-8859-1 characters encoded with UTF-8 to single-byte
>> ISO-8859-1" but my brain starts to bleed around here.. So the
>> encoding of the feed is UTF-8 but the character set is iso-8859-1.=20
>> Is that legal? I really must get my head round these things some
>> time...=20
>>=20
>=20
> The ever-reliable Joel has some entertaining things to say
> about developer confusion over such issues:
> http://www.joelonsoftware.com/articles/Unicode.html
>=20
Yes, I think I read that once before but some of the concepts drifted =
out of
my head through non-use. Ok, so I think I understand the answer to my =
own
question in that utf_decode() should only work for utf-8 strings that =
map
back successfully to iso-8859-1 code points, but it still begs the =
question
why iconv() chokes on the same string, is it simply that utf-decode does =
not
report errors but blithely ignores unmappable code points? =20
If so then I guess I am happy enough all things considered and could =
even
revert to iconv with @ in front if necessary (though I don't know why it
would be).
Dai
--=20
TechnologyAngel
http://www.technologyangel.co.uk/
|
 |
|