You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by John Hawkins <HA...@uk.ibm.com> on 2004/07/20 16:44:44 UTC

UTF problems still




Hi Folks,
got a problem with UTF still - >

did the 1.2 code change anything to do with how the xsd:byte types are
serialized?
xsd:byte is supposed to be the range from -128 to 127, but I can only get
0-9 to work without getting an encoding error.

The problem I'm seeing is this:
I can set it to a single digit by enclosing it in single quotes, so if I
need to set it to 0, I have to use '0'.
If I try to set it to anything other than '0'-'9', I get an error similar
to the one below (since I can't use quotes.)

I need to be able to set it to values with two or three digits.
I would expect to be able to set a byte with just the number, not the
quotes.  Do you know how this is supposed to work?

thanks folks,
John.



John Hawkins



Re: UTF problems still

Posted by John Hawkins <HA...@uk.ibm.com>.



Exactly - and the problem is that setting it without the quotes fails.

John Hawkins


                                                                           
             Kenneth Chiu                                                  
             <chiuk@cs.indiana                                             
             .edu>                                                      To 
                                       Apache AXIS C Developers List       
             21/07/2004 18:30          <ax...@ws.apache.org>          
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
              "Apache AXIS C           Re: UTF problems still              
             Developers List"                                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Not sure exactly what you mean, but if xsd:byte is
defined as a signed char, you should be able to set the
value without the quotes.

    typedef signed char byte;
    byte c;
    c = -10;
    c = 120;

Enclosing in quotes means that you want the ASCII value of
the enclosed character:

    c = '0'; // Same as c = 48;

On Wed, 21 Jul 2004, John Hawkins wrote:
>
>
>
>
> Hi Folks, any clues please?
>
> John Hawkins
>
>
>
>
>              John
>              Hawkins/UK/IBM@IB
>              MGB
To
>                                        axis-c-dev@ws.apache.org
>              20/07/2004 15:44
cc
>
>
Subject
>              Please respond to         UTF problems still
>               "Apache AXIS C
>              Developers List"
>
>
>
>
>
>
>
>
>
>
>
>
> Hi Folks,
> got a problem with UTF still - >
>
> did the 1.2 code change anything to do with how the xsd:byte types are
> serialized?
> xsd:byte is supposed to be the range from -128 to 127, but I can only get
> 0-9 to work without getting an encoding error.
>
> The problem I'm seeing is this:
> I can set it to a single digit by enclosing it in single quotes, so if I
> need to set it to 0, I have to use '0'.
> If I try to set it to anything other than '0'-'9', I get an error similar
> to the one below (since I can't use quotes.)
>
> I need to be able to set it to values with two or three digits.
> I would expect to be able to set a byte with just the number, not the
> quotes.  Do you know how this is supposed to work?
>
> thanks folks,
> John.
>
>
>
> John Hawkins
>
>
>
>



Re: UTF problems still

Posted by Kenneth Chiu <ch...@cs.indiana.edu>.
Not sure exactly what you mean, but if xsd:byte is
defined as a signed char, you should be able to set the
value without the quotes.

    typedef signed char byte;
    byte c;
    c = -10;
    c = 120;

Enclosing in quotes means that you want the ASCII value of
the enclosed character:

    c = '0'; // Same as c = 48;

On Wed, 21 Jul 2004, John Hawkins wrote:
>
>
>
>
> Hi Folks, any clues please?
>
> John Hawkins
>
>
>
>
>              John
>              Hawkins/UK/IBM@IB
>              MGB                                                        To
>                                        axis-c-dev@ws.apache.org
>              20/07/2004 15:44                                           cc
>
>                                                                    Subject
>              Please respond to         UTF problems still
>               "Apache AXIS C
>              Developers List"
>
>
>
>
>
>
>
>
>
>
>
>
> Hi Folks,
> got a problem with UTF still - >
>
> did the 1.2 code change anything to do with how the xsd:byte types are
> serialized?
> xsd:byte is supposed to be the range from -128 to 127, but I can only get
> 0-9 to work without getting an encoding error.
>
> The problem I'm seeing is this:
> I can set it to a single digit by enclosing it in single quotes, so if I
> need to set it to 0, I have to use '0'.
> If I try to set it to anything other than '0'-'9', I get an error similar
> to the one below (since I can't use quotes.)
>
> I need to be able to set it to values with two or three digits.
> I would expect to be able to set a byte with just the number, not the
> quotes.  Do you know how this is supposed to work?
>
> thanks folks,
> John.
>
>
>
> John Hawkins
>
>
>
>

Re: UTF problems still

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Its been a while since I did C/C++ but did you try:

    (char) nnn;

where -128 < nnn < 127?

Sanjiva.
p.s.: There was no error message attached in your email as far
as I could see.

----- Original Message ----- 
From: "John Hawkins" <HA...@uk.ibm.com>
To: "Apache AXIS C Developers List" <ax...@ws.apache.org>
Sent: Wednesday, July 21, 2004 4:06 PM
Subject: Re: UTF problems still


>
>
>
> Hi Folks, any clues please?
>
> John Hawkins
>
>
>
>
>              John
>              Hawkins/UK/IBM@IB
>              MGB                                                        To
>                                        axis-c-dev@ws.apache.org
>              20/07/2004 15:44                                           cc
>
>                                                                    Subject
>              Please respond to         UTF problems still
>               "Apache AXIS C
>              Developers List"
>
>
>
>
>
>
>
>
>
>
>
>
> Hi Folks,
> got a problem with UTF still - >
>
> did the 1.2 code change anything to do with how the xsd:byte types are
> serialized?
> xsd:byte is supposed to be the range from -128 to 127, but I can only get
> 0-9 to work without getting an encoding error.
>
> The problem I'm seeing is this:
> I can set it to a single digit by enclosing it in single quotes, so if I
> need to set it to 0, I have to use '0'.
> If I try to set it to anything other than '0'-'9', I get an error similar
> to the one below (since I can't use quotes.)
>
> I need to be able to set it to values with two or three digits.
> I would expect to be able to set a byte with just the number, not the
> quotes.  Do you know how this is supposed to work?
>
> thanks folks,
> John.
>
>
>
> John Hawkins
>
>
>
>
>


Re: UTF problems still

Posted by John Hawkins <HA...@uk.ibm.com>.



Hi Folks, any clues please?

John Hawkins



                                                                           
             John                                                          
             Hawkins/UK/IBM@IB                                             
             MGB                                                        To 
                                       axis-c-dev@ws.apache.org            
             20/07/2004 15:44                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         UTF problems still                  
              "Apache AXIS C                                               
             Developers List"                                              
                                                                           
                                                                           
                                                                           
                                                                           








Hi Folks,
got a problem with UTF still - >

did the 1.2 code change anything to do with how the xsd:byte types are
serialized?
xsd:byte is supposed to be the range from -128 to 127, but I can only get
0-9 to work without getting an encoding error.

The problem I'm seeing is this:
I can set it to a single digit by enclosing it in single quotes, so if I
need to set it to 0, I have to use '0'.
If I try to set it to anything other than '0'-'9', I get an error similar
to the one below (since I can't use quotes.)

I need to be able to set it to values with two or three digits.
I would expect to be able to set a byte with just the number, not the
quotes.  Do you know how this is supposed to work?

thanks folks,
John.



John Hawkins





RE: UTF problems still

Posted by John Hawkins <HA...@uk.ibm.com>.



Excellent - thankyou very much.


John Hawkins




                                                                           
             "Susantha Kumara"                                             
             <susantha@opensou                                             
             rce.lk>                                                    To 
                                       "'Apache AXIS C Developers List'"   
             22/07/2004 05:31          <ax...@ws.apache.org>          
                                                                        cc 
                                                                           
             Please respond to                                     Subject 
              "Apache AXIS C           RE: UTF problems still              
             Developers List"                                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




I think this problem had been there for long time. I fixed it in CVS
HEAD.

Thanks,

Susantha.

> -----Original Message-----
> From: John Hawkins [mailto:HAWKINSJ@uk.ibm.com]
> Sent: Tuesday, July 20, 2004 8:45 PM
> To: axis-c-dev@ws.apache.org
> Subject: UTF problems still
>
>
>
>
> Hi Folks,
> got a problem with UTF still - >
>
> did the 1.2 code change anything to do with how the xsd:byte types are
> serialized?
> xsd:byte is supposed to be the range from -128 to 127, but I can only
get
> 0-9 to work without getting an encoding error.
>
> The problem I'm seeing is this:
> I can set it to a single digit by enclosing it in single quotes, so if
I
> need to set it to 0, I have to use '0'.
> If I try to set it to anything other than '0'-'9', I get an error
similar
> to the one below (since I can't use quotes.)
>
> I need to be able to set it to values with two or three digits.
> I would expect to be able to set a byte with just the number, not the
> quotes.  Do you know how this is supposed to work?
>
> thanks folks,
> John.
>
>
>
> John Hawkins
>





RE: UTF problems still

Posted by Susantha Kumara <su...@opensource.lk>.
I think this problem had been there for long time. I fixed it in CVS
HEAD.

Thanks,

Susantha.

> -----Original Message-----
> From: John Hawkins [mailto:HAWKINSJ@uk.ibm.com]
> Sent: Tuesday, July 20, 2004 8:45 PM
> To: axis-c-dev@ws.apache.org
> Subject: UTF problems still
> 
> 
> 
> 
> Hi Folks,
> got a problem with UTF still - >
> 
> did the 1.2 code change anything to do with how the xsd:byte types are
> serialized?
> xsd:byte is supposed to be the range from -128 to 127, but I can only
get
> 0-9 to work without getting an encoding error.
> 
> The problem I'm seeing is this:
> I can set it to a single digit by enclosing it in single quotes, so if
I
> need to set it to 0, I have to use '0'.
> If I try to set it to anything other than '0'-'9', I get an error
similar
> to the one below (since I can't use quotes.)
> 
> I need to be able to set it to values with two or three digits.
> I would expect to be able to set a byte with just the number, not the
> quotes.  Do you know how this is supposed to work?
> 
> thanks folks,
> John.
> 
> 
> 
> John Hawkins
>