Hi there;
There is a problem in my code. I've designed a web site that reads and querying over a XML file. Here is my XML file structure:

<?xml version="1.0" encoding="utf8"?>
<Root>
<User>
<name> ayça <name>
<surname> demir <name>
<department> ftr </department>
<TCIdno secrecy="c">48622845695</TCIdno>
<rank> tuğgeneral </rank>
<telNo> 2114 </telNo>
<deckNo> 2114 </deckNo>
<mobileNo secrecy="c"> 05321751081 </mobileNo>
<homeTelNo secrecy="c"> 03121751081 </homeTelNo>
</User>
</Root>

As you see above, name tag contains a Turkish character: "ç". When a user types "ayça" to text input, it do not find "ayça".
Anyway when user types "demir", my code can find that node, but, it prints "ayça" instead of "ayça".

I have two different html pages to query over the xml file. The first one is simple, it contains only html pages. The latter is more complicated, it contains drop-down lists, auto-complete feature. The first one successfully compares and prints; however, second one fails.
How can I overcome that situation?

It's pretty easy: simply check that in the whole process you're using utf8 encoding and if not, force it. It's not by just setting in the header of the xml that you'll accomplish this, check with your favourite editor, or notepad++ if it's really in utf8 at first, than make sure that even your ajax call will request content with utf8 encoding.
hope it helps
A.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.