Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. MSXML load - not able to read chinese characters in path

MSXML load - not able to read chinese characters in path

Scheduled Pinned Locked Moved C / C++ / MFC
xmlhelpquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gopi Nath
    wrote on last edited by
    #1

    Hello Everybody, I am trying to read XML file using MSXML parser. Till now, all paths are in English characters and inside file also all are in English only. Now, we are trying to move with Chinese characters also. So, inside file wherever needed, we are able to manage conversion and load the file using MSXML parser. Now, the problem is, if the path of the xml file consists of Chinese characters, then IXMLDOMDocumentPtr->load(path) is not working. Is there anyway to load the file ? PS. we can able to write a new parser, but need to change a lot in our existing application. Thanks in advance. Regards, Gopinath.

    L D V G 5 Replies Last reply
    0
    • G Gopi Nath

      Hello Everybody, I am trying to read XML file using MSXML parser. Till now, all paths are in English characters and inside file also all are in English only. Now, we are trying to move with Chinese characters also. So, inside file wherever needed, we are able to manage conversion and load the file using MSXML parser. Now, the problem is, if the path of the xml file consists of Chinese characters, then IXMLDOMDocumentPtr->load(path) is not working. Is there anyway to load the file ? PS. we can able to write a new parser, but need to change a lot in our existing application. Thanks in advance. Regards, Gopinath.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Gopi Nath wrote:

      is not working

      What does that mean?

      G 1 Reply Last reply
      0
      • L Lost User

        Gopi Nath wrote:

        is not working

        What does that mean?

        G Offline
        G Offline
        Gopi Nath
        wrote on last edited by
        #3

        Hello Richard, MSXML::IXMLDOMDocumentPtr->load function, when I tried to load a file in which the path or file name contains Chinese characters, its not loading. Means, it fails to load the file into the document pointer and return false. Regards, Gopinath.

        L 1 Reply Last reply
        0
        • G Gopi Nath

          Hello Richard, MSXML::IXMLDOMDocumentPtr->load function, when I tried to load a file in which the path or file name contains Chinese characters, its not loading. Means, it fails to load the file into the document pointer and return false. Regards, Gopinath.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Then you need to use your debugger to find out why that load is failing. Are you using proper Unicode file paths? See Naming Files, Paths, and Namespaces (Windows)[^].

          G 1 Reply Last reply
          0
          • L Lost User

            Then you need to use your debugger to find out why that load is failing. Are you using proper Unicode file paths? See Naming Files, Paths, and Namespaces (Windows)[^].

            G Offline
            G Offline
            Gopi Nath
            wrote on last edited by
            #5

            Thanks Richard, I will check and will get back to you on this. Regards, Gopinath.

            1 Reply Last reply
            0
            • G Gopi Nath

              Hello Everybody, I am trying to read XML file using MSXML parser. Till now, all paths are in English characters and inside file also all are in English only. Now, we are trying to move with Chinese characters also. So, inside file wherever needed, we are able to manage conversion and load the file using MSXML parser. Now, the problem is, if the path of the xml file consists of Chinese characters, then IXMLDOMDocumentPtr->load(path) is not working. Is there anyway to load the file ? PS. we can able to write a new parser, but need to change a lot in our existing application. Thanks in advance. Regards, Gopinath.

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              Do you need to canonicalize the path?

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

              1 Reply Last reply
              0
              • G Gopi Nath

                Hello Everybody, I am trying to read XML file using MSXML parser. Till now, all paths are in English characters and inside file also all are in English only. Now, we are trying to move with Chinese characters also. So, inside file wherever needed, we are able to manage conversion and load the file using MSXML parser. Now, the problem is, if the path of the xml file consists of Chinese characters, then IXMLDOMDocumentPtr->load(path) is not working. Is there anyway to load the file ? PS. we can able to write a new parser, but need to change a lot in our existing application. Thanks in advance. Regards, Gopinath.

                V Offline
                V Offline
                Victor Nijegorodov
                wrote on last edited by
                #7

                Perhaps, there is some problem with encoding?

                1 Reply Last reply
                0
                • G Gopi Nath

                  Hello Everybody, I am trying to read XML file using MSXML parser. Till now, all paths are in English characters and inside file also all are in English only. Now, we are trying to move with Chinese characters also. So, inside file wherever needed, we are able to manage conversion and load the file using MSXML parser. Now, the problem is, if the path of the xml file consists of Chinese characters, then IXMLDOMDocumentPtr->load(path) is not working. Is there anyway to load the file ? PS. we can able to write a new parser, but need to change a lot in our existing application. Thanks in advance. Regards, Gopinath.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Gopi Nath wrote:

                  Now, the problem is, if the path of the xml file consists of Chinese characters, then IXMLDOMDocumentPtr->load(path) is not working.

                  You left out so much relevant information... 1.) Could you give an example path containing Chinese characters that fails to load? 2.) What MSXML DLL version? 3.) What operating system version? Best Wishes, -David Delaune

                  1 Reply Last reply
                  0
                  • G Gopi Nath

                    Hello Everybody, I am trying to read XML file using MSXML parser. Till now, all paths are in English characters and inside file also all are in English only. Now, we are trying to move with Chinese characters also. So, inside file wherever needed, we are able to manage conversion and load the file using MSXML parser. Now, the problem is, if the path of the xml file consists of Chinese characters, then IXMLDOMDocumentPtr->load(path) is not working. Is there anyway to load the file ? PS. we can able to write a new parser, but need to change a lot in our existing application. Thanks in advance. Regards, Gopinath.

                    G Offline
                    G Offline
                    Gopi Nath
                    wrote on last edited by
                    #9

                    Hello Everybody, Sorry for late reply. It was character issue. My application is with Unicode character type. If I send the path as TSTR, then it works fine properly. Thanks again. Regards, Gopinath.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups