By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,949 Members | 1,838 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,949 IT Pros & Developers. It's quick & easy.

Convert XML ISO-8869 (European) to UTF-8 (ASCII)

code green
Expert 100+
P: 1,726
I filter XML files through PHP for validation before passing to a SQL Server based program.
This of the shelf program can only handle ASCII characters and not the extended ISO-8869 character set.
It looks like I need to extend my script to convert accented characters and such like to their closest ASCII character.
Is anybody aware of anything that could help me achieve this?
Sep 4 '08 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 8,639
first a note: UTF-8 (contains 65,536 characters) is not ASCII.

One way to do this, though not very elegant, is to use a kind of conversation table (like => a, ...) and write a replacement function.
Another ways is to convert the characters to entities (htmlentities()), which I would prefer.

Sep 4 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.