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. \r\n -confused [modified]

\r\n -confused [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studioagentic-aidebuggingquestion
13 Posts 7 Posters 1 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.
  • M Michael Pauli

    Hi! I can not figure this one out: I have two MFC-projects. One compiles in VS 2002 and one in VS 2005. At a certain point I have this line in both projects: const TCHAR szHeaders[] = _T("Accept: text/*\r\nUser-Agent: XYZ\r\n"); Now, in VS 2002 \r\n is intrepreted as a normal CRLF but not in VS 2005 it seems. (MS: "The _TCHAR data type is defined conditionally in Tchar.h. If the symbol _UNICODE is defined for your build, _TCHAR is defined as wchar_t; otherwise, for single-byte and MBCS builds, it is defined as char.") I have tried #undef _UNICODE without any luck! Debugger shows two squares: □□ like when !isascii() and does not break the line. Is it just the debugger or some conspericy going on here? -- modified at 7:35 Monday 5th February, 2007

    Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

    C Offline
    C Offline
    Christian Graus
    wrote on last edited by
    #3

    *sniff* smells like something for the C++ forum...

    Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

    B G 2 Replies Last reply
    0
    • C Christian Graus

      *sniff* smells like something for the C++ forum...

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      B Offline
      B Offline
      Bradml
      wrote on last edited by
      #4

      He can't catch a breal can he.... ;P


      Brad Australian - Christian Graus on "Best books for VBscript" A big thick one, so you can whack yourself on the head with it.

      1 Reply Last reply
      0
      • C Christian Graus

        *sniff* smells like something for the C++ forum...

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

        G Offline
        G Offline
        Gary Kirkham
        wrote on last edited by
        #5

        It's clearly just a rant. ;P

        Gary Kirkham Forever Forgiven and Alive in the Spirit He is no fool who gives what he cannot keep to gain what he cannot lose. - Jim Elliot Me blog, You read

        1 Reply Last reply
        0
        • B Bradml

          Could it be a mix up between the plain text return and the rich text return?


          Brad Australian - Christian Graus on "Best books for VBscript" A big thick one, so you can whack yourself on the head with it.

          M Offline
          M Offline
          Michael Pauli
          wrote on last edited by
          #6

          Or some wierd compiler bug? - I mean since I have not added/removed any defines etc. Hmmmm...

          Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

          1 Reply Last reply
          0
          • M Michael Pauli

            Hi! I can not figure this one out: I have two MFC-projects. One compiles in VS 2002 and one in VS 2005. At a certain point I have this line in both projects: const TCHAR szHeaders[] = _T("Accept: text/*\r\nUser-Agent: XYZ\r\n"); Now, in VS 2002 \r\n is intrepreted as a normal CRLF but not in VS 2005 it seems. (MS: "The _TCHAR data type is defined conditionally in Tchar.h. If the symbol _UNICODE is defined for your build, _TCHAR is defined as wchar_t; otherwise, for single-byte and MBCS builds, it is defined as char.") I have tried #undef _UNICODE without any luck! Debugger shows two squares: □□ like when !isascii() and does not break the line. Is it just the debugger or some conspericy going on here? -- modified at 7:35 Monday 5th February, 2007

            Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

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

            Michael Mogensen wrote:

            Now, in VS 2002 \r\n is intrepreted as a normal CRLF but not in VS 2005 it seems.

            How are you verifying this?


            "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

            "Judge not by the eye but by the heart." - Native American Proverb

            M 1 Reply Last reply
            0
            • B Bradml

              Could it be a mix up between the plain text return and the rich text return?


              Brad Australian - Christian Graus on "Best books for VBscript" A big thick one, so you can whack yourself on the head with it.

              E Offline
              E Offline
              Eytukan
              wrote on last edited by
              #8

              It looks like this thread has been *handled* by the Policy Control Authority. Did he actually post this in the lounge?


              Dario: How is "directory" in French? (I mean a file system directory). John Simmons: "zee file holdaire thingie"

              1 Reply Last reply
              0
              • M Michael Pauli

                Hi! I can not figure this one out: I have two MFC-projects. One compiles in VS 2002 and one in VS 2005. At a certain point I have this line in both projects: const TCHAR szHeaders[] = _T("Accept: text/*\r\nUser-Agent: XYZ\r\n"); Now, in VS 2002 \r\n is intrepreted as a normal CRLF but not in VS 2005 it seems. (MS: "The _TCHAR data type is defined conditionally in Tchar.h. If the symbol _UNICODE is defined for your build, _TCHAR is defined as wchar_t; otherwise, for single-byte and MBCS builds, it is defined as char.") I have tried #undef _UNICODE without any luck! Debugger shows two squares: □□ like when !isascii() and does not break the line. Is it just the debugger or some conspericy going on here? -- modified at 7:35 Monday 5th February, 2007

                Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

                M Offline
                M Offline
                Mark Salsbery
                wrote on last edited by
                #9

                Maybe I missed it somewhere, but where are you using this char data? The interpretation of crlf and/or newlines varies by use.

                1 Reply Last reply
                0
                • D David Crow

                  Michael Mogensen wrote:

                  Now, in VS 2002 \r\n is intrepreted as a normal CRLF but not in VS 2005 it seems.

                  How are you verifying this?


                  "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                  "Judge not by the eye but by the heart." - Native American Proverb

                  M Offline
                  M Offline
                  Michael Pauli
                  wrote on last edited by
                  #10

                  Just by looking into the buffer at a breakpoint after assignment/creation. It MUST be something I've missed but I just can't see it! I'll go into the hex tonight.

                  Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

                  D 1 Reply Last reply
                  0
                  • M Michael Pauli

                    Just by looking into the buffer at a breakpoint after assignment/creation. It MUST be something I've missed but I just can't see it! I'll go into the hex tonight.

                    Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

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

                    Michael Mogensen wrote:

                    Just by looking into the buffer at a breakpoint after assignment/creation.

                    Are you using var,s or var,su in the watch window?


                    "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                    "Judge not by the eye but by the heart." - Native American Proverb

                    M 1 Reply Last reply
                    0
                    • D David Crow

                      Michael Mogensen wrote:

                      Just by looking into the buffer at a breakpoint after assignment/creation.

                      Are you using var,s or var,su in the watch window?


                      "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                      "Judge not by the eye but by the heart." - Native American Proverb

                      M Offline
                      M Offline
                      Michael Pauli
                      wrote on last edited by
                      #12

                      Is var,s and var,su some VS-setting or something? I don't know what I'm using... sorry... where do I check it?

                      Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

                      D 1 Reply Last reply
                      0
                      • M Michael Pauli

                        Is var,s and var,su some VS-setting or something? I don't know what I'm using... sorry... where do I check it?

                        Regards, Michael Mogensen, mm it-consult dk. ><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>

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

                        Michael Mogensen wrote:

                        Is var,s and var,su some VS-setting or something?

                        Yes, for the watch window.

                        Michael Mogensen wrote:

                        where do I check it?

                        See here.


                        "Approved Workmen Are Not Ashamed" - 2 Timothy 2:15

                        "Judge not by the eye but by the heart." - Native American Proverb

                        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