Off Topic possibly

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jack Russell

    #1

    Off Topic possibly

    I use comma delimited strings in data files.

    If I set my computer region/ culture to Spanish / Argentina the decimal
    character and the list separator are both set to "'" (comma.

    This makes decoding the strings almost impossible in certain cases.

    Anyone know if this is really rue for that locale or is it an XP bug.
    Where would be the right forum to get an answer to this.

    Thanks

    Jack Russell
  • Trevor Benedict

    #2
    Re: Off Topic possibly


    This may not be a perfect example to solve your problem, but shows you how
    to get it done. So the source as well as the target should respond to this
    change.


    HTH

    Regards,

    Trevor Benedict

    "Jack Russell" <jackr@norubbis h.tpg.com.auwro te in message
    news:eMWI3qvJIH A.5860@TK2MSFTN GP04.phx.gbl...
    >I use comma delimited strings in data files.
    >
    If I set my computer region/ culture to Spanish / Argentina the decimal
    character and the list separator are both set to "'" (comma.
    >
    This makes decoding the strings almost impossible in certain cases.
    >
    Anyone know if this is really rue for that locale or is it an XP bug.
    Where would be the right forum to get an answer to this.
    >
    Thanks
    >
    Jack Russell

    Comment

    • Armin Zingler

      #3
      Re: Off Topic possibly

      "Jack Russell" <jackr@norubbis h.tpg.com.ausch rieb
      I use comma delimited strings in data files.
      >
      If I set my computer region/ culture to Spanish / Argentina the
      decimal character and the list separator are both set to "'" (comma.
      >
      This makes decoding the strings almost impossible in certain cases.
      Why? What is the problem? Is the "'" also used as the quoting character for
      strings? If it is, it's already wrong how the file is written. Do you write
      the file on your own or don't you have an influence on the format?
      Anyone know if this is really rue for that locale or is it an XP
      bug. Where would be the right forum to get an answer to this.
      Even if off-topic you can put the subject into the subject line. :-)


      Armin

      Comment

      • Jack Russell

        #4
        Re: Off Topic possibly

        Trevor Benedict wrote:
        This may not be a perfect example to solve your problem, but shows you how
        to get it done. So the source as well as the target should respond to this
        change.

        >
        HTH
        >
        Regards,
        >
        Trevor Benedict
        >
        "Jack Russell" <jackr@norubbis h.tpg.com.auwro te in message
        news:eMWI3qvJIH A.5860@TK2MSFTN GP04.phx.gbl...
        >
        >>I use comma delimited strings in data files.
        >>
        >>If I set my computer region/ culture to Spanish / Argentina the decimal
        >>character and the list separator are both set to "'" (comma.
        >>
        >>This makes decoding the strings almost impossible in certain cases.
        >>
        >>Anyone know if this is really rue for that locale or is it an XP bug.
        >>Where would be the right forum to get an answer to this.
        >>
        >>Thanks
        >>
        >>Jack Russell
        >
        >
        >
        Thanks I will take a look

        Comment

        • Jack Russell

          #5
          Re: Off Topic possibly

          It is a comma not an apostrophe

          So does the string 1,2,3 represent 1.2, 3 or 1,2.3 or 1,2,3?

          Armin Zingler wrote:
          "Jack Russell" <jackr@norubbis h.tpg.com.ausch rieb
          >
          >I use comma delimited strings in data files.
          >>
          >If I set my computer region/ culture to Spanish / Argentina the
          >decimal character and the list separator are both set to "'" (comma.
          >>
          >This makes decoding the strings almost impossible in certain cases.
          >
          >
          Why? What is the problem? Is the "'" also used as the quoting character
          for strings? If it is, it's already wrong how the file is written. Do
          you write the file on your own or don't you have an influence on the
          format?
          >
          >Anyone know if this is really rue for that locale or is it an XP
          >bug. Where would be the right forum to get an answer to this.
          >
          >
          Even if off-topic you can put the subject into the subject line. :-)
          >
          >
          Armin

          Comment

          • Jack Russell

            #6
            Re: Off Topic possibly

            Thanks I do all that and it works fine if the decimal and separator
            characters are different. However you have to break the comma delimited
            string up first.

            so does 1,2,3 represent 1,2.3 or 1.2,3 or even 1,2,3?

            Thanks anyway

            Jack Russell



            Trevor Benedict wrote:
            This may not be a perfect example to solve your problem, but shows you how
            to get it done. So the source as well as the target should respond to this
            change.

            >
            HTH
            >
            Regards,
            >
            Trevor Benedict
            >
            "Jack Russell" <jackr@norubbis h.tpg.com.auwro te in message
            news:eMWI3qvJIH A.5860@TK2MSFTN GP04.phx.gbl...
            >
            >>I use comma delimited strings in data files.
            >>
            >>If I set my computer region/ culture to Spanish / Argentina the decimal
            >>character and the list separator are both set to "'" (comma.
            >>
            >>This makes decoding the strings almost impossible in certain cases.
            >>
            >>Anyone know if this is really rue for that locale or is it an XP bug.
            >>Where would be the right forum to get an answer to this.
            >>
            >>Thanks
            >>
            >>Jack Russell
            >
            >
            >

            Comment

            • Armin Zingler

              #7
              Re: Off Topic possibly

              "Jack Russell" <jackr@norubbis h.tpg.com.ausch rieb
              It is a comma not an apostrophe
              >
              So does the string 1,2,3 represent 1.2, 3 or 1,2.3 or 1,2,3?

              As I wrote:
              If it is, it's already wrong how the file
              is written. Do you write the file on your own or don't you have an
              influence on the format?


              Armin

              Comment

              • Jack Russell

                #8
                Re: Off Topic possibly

                Armin Zingler wrote:
                "Jack Russell" <jackr@norubbis h.tpg.com.ausch rieb
                >
                >It is a comma not an apostrophe
                >>
                >So does the string 1,2,3 represent 1.2, 3 or 1,2.3 or 1,2,3?
                >
                >
                >
                As I wrote:
                >
                If it is, it's already wrong how the file
                is written. Do you write the file on your own or don't you have an
                influence on the format?
                >
                >
                >
                >
                Armin
                In some cases I write it and I agree that I could control that. However
                they also type in formulae in the English form part of which would be

                Formula(1.2,3)

                However presumably, if XP is right then in their locale they would type

                Formula (1,2,3) which is undecipherable.

                I am trying to find out what they actually do in this case (according to
                XP that is the standard for Spanish in the whole American continent
                (North and south) but not in Spain. I find it a bit hard to believe.

                Comment

                • Armin Zingler

                  #9
                  Re: Off Topic possibly

                  "Jack Russell" <jackr@norubbis h.tpg.com.ausch rieb
                  Armin Zingler wrote:
                  "Jack Russell" <jackr@norubbis h.tpg.com.ausch rieb
                  It is a comma not an apostrophe
                  >
                  So does the string 1,2,3 represent 1.2, 3 or 1,2.3 or 1,2,3?


                  As I wrote:
                  If it is, it's already wrong how the file
                  is written. Do you write the file on your own or don't you
                  have an influence on the format?



                  Armin
                  In some cases I write it and I agree that I could control that.
                  However they also type in formulae in the English form part of which
                  would be
                  >
                  Formula(1.2,3)
                  >
                  However presumably, if XP is right then in their locale they would
                  type
                  >
                  Formula (1,2,3) which is undecipherable.
                  >
                  I am trying to find out what they actually do in this case
                  (according to XP that is the standard for Spanish in the whole
                  American continent (North and south) but not in Spain. I find it a
                  bit hard to believe.
                  I don't understand. *Where* is this written?


                  I'd say, write to the file in the English format and it will be unambiguous.
                  You can format it by passing the NumberFormatInf o object to the number's
                  ToString method. You get that object from
                  System.Globaliz ation.CultureIn fo.InvariantCul ture.NumberForm at


                  Armin

                  Comment

                  • Michel Posseth  [MCP]

                    #10
                    Re: Off Topic possibly

                    when i went international with programming , a long long time ago when
                    ..Net was not yet invented :-)
                    i choose Tab (blabla blabla) delimited or pipe (blabla|blabla )
                    delimited formats

                    for these situations 1,2,3 was it 1.23 or 12.3 or 1 and 2.3 or 1.2
                    and 3 etc etc etc is simply no solution if you can`t enforce / asume
                    region / culture settings

                    so you should write deliver your data in a global way , ever thought about
                    a lightweight database ? ( sql server everywhere for instance )

                    regards

                    Michel


                    "Jack Russell" <jackr@norubbis h.tpg.com.ausch reef in bericht
                    news:eMWI3qvJIH A.5860@TK2MSFTN GP04.phx.gbl...
                    >I use comma delimited strings in data files.
                    >
                    If I set my computer region/ culture to Spanish / Argentina the decimal
                    character and the list separator are both set to "'" (comma.
                    >
                    This makes decoding the strings almost impossible in certain cases.
                    >
                    Anyone know if this is really rue for that locale or is it an XP bug.
                    Where would be the right forum to get an answer to this.
                    >
                    Thanks
                    >
                    Jack Russell

                    Comment

                    • Jack Russell

                      #11
                      Re: Off Topic possibly

                      Michel,

                      Trouble is the client does not want to change the software just for this
                      instance. It seems strange to me that "Spanish America" has these
                      contradictory settings.

                      So, the client wants me to warn if the settings conflict and let the end
                      user sort it out!

                      However thanks for your suggestions, if I ever do another project like
                      this I will take them on board.

                      Jack

                      Michel Posseth [MCP] wrote:
                      when i went international with programming , a long long time ago when
                      ..Net was not yet invented :-)
                      i choose Tab (blabla blabla) delimited or pipe (blabla|blabla )
                      delimited formats
                      >
                      for these situations 1,2,3 was it 1.23 or 12.3 or 1 and 2.3 or 1.2
                      and 3 etc etc etc is simply no solution if you can`t enforce / asume
                      region / culture settings
                      >
                      so you should write deliver your data in a global way , ever thought about
                      a lightweight database ? ( sql server everywhere for instance )
                      >
                      regards
                      >
                      Michel
                      >
                      >
                      "Jack Russell" <jackr@norubbis h.tpg.com.ausch reef in bericht
                      news:eMWI3qvJIH A.5860@TK2MSFTN GP04.phx.gbl...
                      >
                      >>I use comma delimited strings in data files.
                      >>
                      >>If I set my computer region/ culture to Spanish / Argentina the decimal
                      >>character and the list separator are both set to "'" (comma.
                      >>
                      >>This makes decoding the strings almost impossible in certain cases.
                      >>
                      >>Anyone know if this is really rue for that locale or is it an XP bug.
                      >>Where would be the right forum to get an answer to this.
                      >>
                      >>Thanks
                      >>
                      >>Jack Russell
                      >
                      >
                      >

                      Comment

                      • Cor Ligthert[MVP]

                        #12
                        Re: Off Topic possibly

                        Jack,

                        By the way, this is in my idea in no way Off Topic.

                        Cor

                        Comment

                        • Cor Ligthert[MVP]

                          #13
                          Re: Off Topic possibly

                          Jack,

                          As far as I know is the standard string seperation character for all non
                          English European languages the ";".

                          For the rest are the cultures setting doing all the work.

                          I don't know how the decimal seperator is showed up in things as
                          intelligence in your IDE. In my English IDE the comma separator is showed as
                          a dot while for output that is translated to a comma, while my culture
                          settings are Dutch.

                          Cor

                          Comment

                          • Michel Posseth  [MCP]

                            #14
                            Re: Off Topic possibly

                            Well wait untill you must write programs for the Netherlands , where the
                            decimal seperator is a ',' but every person is using a US keyboard if you
                            then have to write data entry applications on numeric fields you get the
                            funny situation that a "." is entered by the user when he actually expects a
                            "," although he hitted the "." key on the numeric pad , and this is in the
                            Netherlands wrong , when we did some investigation we noticed that all MS
                            products ( calculator , office etc etc ) simply check the settings and if
                            needed change the "." to a "," so on the fly we simply change the numeric
                            "." to a "," when pressed :-)

                            You could do the same thing i guess when your program exports data just
                            change the lisseperator to another value if it is a "," however this will
                            not solve the issue when a user wants to import a file with "," seperated
                            columns and numeric fractional digits

                            HTH

                            Michel


                            "Jack Russell" <jackr@norubbis h.tpg.com.ausch reef in bericht
                            news:OF%23nBoxJ IHA.3356@TK2MSF TNGP02.phx.gbl. ..
                            Michel,
                            >
                            Trouble is the client does not want to change the software just for this
                            instance. It seems strange to me that "Spanish America" has these
                            contradictory settings.
                            >
                            So, the client wants me to warn if the settings conflict and let the end
                            user sort it out!
                            >
                            However thanks for your suggestions, if I ever do another project like
                            this I will take them on board.
                            >
                            Jack
                            >
                            Michel Posseth [MCP] wrote:
                            >when i went international with programming , a long long time ago when
                            >..Net was not yet invented :-)
                            >i choose Tab (blabla blabla) delimited or pipe (blabla|blabla )
                            >delimited formats
                            >>
                            >for these situations 1,2,3 was it 1.23 or 12.3 or 1 and 2.3 or 1.2
                            >and 3 etc etc etc is simply no solution if you can`t enforce / asume
                            >region / culture settings
                            >>
                            >so you should write deliver your data in a global way , ever thought
                            >about a lightweight database ? ( sql server everywhere for instance )
                            >>
                            >regards
                            >>
                            >Michel
                            >>
                            >>
                            >"Jack Russell" <jackr@norubbis h.tpg.com.ausch reef in bericht
                            >news:eMWI3qvJI HA.5860@TK2MSFT NGP04.phx.gbl.. .
                            >>
                            >>>I use comma delimited strings in data files.
                            >>>
                            >>>If I set my computer region/ culture to Spanish / Argentina the decimal
                            >>>character and the list separator are both set to "'" (comma.
                            >>>
                            >>>This makes decoding the strings almost impossible in certain cases.
                            >>>
                            >>>Anyone know if this is really rue for that locale or is it an XP bug.
                            >>>Where would be the right forum to get an answer to this.
                            >>>
                            >>>Thanks
                            >>>
                            >>>Jack Russell
                            >>
                            >>

                            Comment

                            • Jack Russell

                              #15
                              Re: Off Topic possibly

                              Michel,

                              I did some test with excel and it seeks to force the list separator to
                              semi colon if the decimal separator is comma.

                              My client asked one of his employees who is Venezuelan how it worked
                              with the decimal and list separators being both comma and his reply was
                              "if the software does not work we set our PC to US English!"

                              I like your translating the input character idea but am still confused
                              if the American Spanish expect both decimal and list to be comma how do
                              I know which he meant to hit!



                              Jack



                              Michel Posseth [MCP] wrote:
                              Well wait untill you must write programs for the Netherlands , where the
                              decimal seperator is a ',' but every person is using a US keyboard if you
                              then have to write data entry applications on numeric fields you get the
                              funny situation that a "." is entered by the user when he actually expects a
                              "," although he hitted the "." key on the numeric pad , and this is in the
                              Netherlands wrong , when we did some investigation we noticed that all MS
                              products ( calculator , office etc etc ) simply check the settings and if
                              needed change the "." to a "," so on the fly we simply change the numeric
                              "." to a "," when pressed :-)
                              >
                              You could do the same thing i guess when your program exports data just
                              change the lisseperator to another value if it is a "," however this will
                              not solve the issue when a user wants to import a file with "," seperated
                              columns and numeric fractional digits
                              >
                              HTH
                              >
                              Michel
                              >
                              >
                              "Jack Russell" <jackr@norubbis h.tpg.com.ausch reef in bericht
                              news:OF%23nBoxJ IHA.3356@TK2MSF TNGP02.phx.gbl. ..
                              >
                              >>Michel,
                              >>
                              >>Trouble is the client does not want to change the software just for this
                              >>instance. It seems strange to me that "Spanish America" has these
                              >>contradicto ry settings.
                              >>
                              >>So, the client wants me to warn if the settings conflict and let the end
                              >>user sort it out!
                              >>
                              >>However thanks for your suggestions, if I ever do another project like
                              >>this I will take them on board.
                              >>
                              >>Jack
                              >>
                              >>Michel Posseth [MCP] wrote:
                              >>
                              >>>when i went international with programming , a long long time ago when
                              >>>..Net was not yet invented :-)
                              >>>i choose Tab (blabla blabla) delimited or pipe (blabla|blabla )
                              >>>delimited formats
                              >>>
                              >>>for these situations 1,2,3 was it 1.23 or 12.3 or 1 and 2.3 or 1.2
                              >>>and 3 etc etc etc is simply no solution if you can`t enforce / asume
                              >>>region / culture settings
                              >>>
                              >>>so you should write deliver your data in a global way , ever thought
                              >>>about a lightweight database ? ( sql server everywhere for instance )
                              >>>
                              >>>regards
                              >>>
                              >>>Michel
                              >>>
                              >>>
                              >>>"Jack Russell" <jackr@norubbis h.tpg.com.ausch reef in bericht
                              >>>news:eMWI3qv JIHA.5860@TK2MS FTNGP04.phx.gbl ...
                              >>>
                              >>>
                              >>>>I use comma delimited strings in data files.
                              >>>>
                              >>>>If I set my computer region/ culture to Spanish / Argentina the decimal
                              >>>>character and the list separator are both set to "'" (comma.
                              >>>>
                              >>>>This makes decoding the strings almost impossible in certain cases.
                              >>>>
                              >>>>Anyone know if this is really rue for that locale or is it an XP bug.
                              >>>>Where would be the right forum to get an answer to this.
                              >>>>
                              >>>>Thanks
                              >>>>
                              >>>>Jack Russell
                              >>>
                              >>>
                              >

                              Comment

                              Working...