Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#411 Problem in Parsing using expat on Windows

Platform Specific
closed-works-for-me
Karl Waclawek
5
2006-07-05
2006-06-13
Anonymous
No

Hi,

I am using expat to parse xml file.
The parsing works fine in Unix but in windows I am
facing problems.

The start tag in case of Windows is only returning the
first character.

e.g.
if the tag is like
<property name="name" />
in the Handler for start tag, only the first character
p from "property" is returned.
I am linking with static library libexpatwMT.lib and
have also defined XML_STATIC.
Please let me know if i am doing anything wrong.

Expat Version: 1.95.8

Thanks in advance,
Asif Iqbal

Discussion

  • Karl Waclawek
    Karl Waclawek
    2006-06-13

    Logged In: YES
    user_id=290026

    On Windows, libexpatw... returns characters in UTF-16
    encoding, libexpat... returns them in UTF-8 encoding.

    On Unix, UTF-8 is the standard encoding, on Windows it is
    UTF-16. Just treat the text as UTF-16, and you should be fine.

     
  • Karl Waclawek
    Karl Waclawek
    2006-06-13

    • assigned_to: fdrake --> kwaclaw
     
  • Karl Waclawek
    Karl Waclawek
    2006-07-05

    • status: open --> closed-works-for-me
     
  • Karl Waclawek
    Karl Waclawek
    2006-07-05

    Logged In: YES
    user_id=290026

    As Fred already said on another issue, this is an FAQ, not a
    bug report. Closing this issue.