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 "songlei (JIRA)" <ji...@apache.org> on 2008/09/17 12:03:44 UTC

[jira] Created: (AXIS2C-1265) guththila does not support Chinese and the Japanese.

guththila does not support Chinese and the Japanese.
----------------------------------------------------

                 Key: AXIS2C-1265
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1265
             Project: Axis2-C
          Issue Type: Bug
          Components: guththila
    Affects Versions: 1.5.0
         Environment: windows xp sp2 japan
            Reporter: songlei
             Fix For: 1.5.0


data:

a.xml
<?xml version='1.0' encoding='UTF-8'?>
<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>名前</ns:displayname>
	<ns:value>2</ns:value>
</ns:unit>
</ns:parameter>
---------------------------------------------------------------------
code:

axiom_node_t *root_node = NULL;
axiom_node_t *child = NULL;
axiom_document_t *document = NULL;
axiom_stax_builder_t *om_builder = NULL;
axiom_xml_reader_t *xml_reader = NULL;

f = fopen("a.xml","r");
xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
om_builder = axiom_stax_builder_create(env, xml_reader);
document = axiom_stax_builder_get_document(om_builder, env);
root_node = axiom_document_get_root_element(document, env);
axiom_document_build_all(document, env);
child = axiom_node_get_first_child(root_node, env);

--------------------------------------------------------------------------------------------
result:

The analysis result is under shows:

<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>門雷:名前</ns:displayname>
</ns:unit>
</ns:parameter>

value lost

---------------------------------------------------------------------------------------------------------------
debug:

.\axis2c\guththila\src\guththila_xml_parser.c
1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
1533 
GUTHTHILA_BUFFER_PRE_DATA_SIZE
1534                                                    (m->buffer)];
1535            return c >= 0 ? c : -1;

c is int.
m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
char scope is - 127~128.
char[i] char [i+1]  == 門
char[i]  > 128
char becomes int, c < 0

om_builder-done = true.





-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: Take me off of the mailing list PLEASE.

Posted by Dumindu Pallewela <pa...@gmail.com>.
On Sun, May 10, 2009 at 12:01 AM, Mike Zhao <zh...@hotmail.com> wrote:

>  what are you talking about? Sounds like a fraud and you may be reported
> soon.
>
>

IIUC, what he meant was to go here [1] and learn how to unsubscribe. :)

Cheers!
Dumindu.

[1] http://ws.apache.org/axis2/c/lists_issues.html

RE: Take me off of the mailing list PLEASE.

Posted by Mike Zhao <zh...@hotmail.com>.
what are you talking about? Sounds like a fraud and you may be reported soon.
 
> Subject: RE: Take me off of the mailing list PLEASE.
> Date: Fri, 8 May 2009 15:55:21 -0500
> From: Hatim.Daginawala@argodata.com
> To: axis-c-dev@ws.apache.org
> 
> It costs USD 20.00 to get off of this list.
> Would you like to send in a check or pay with the credit card?
> 
> http://ws.apache.org/axis2/c/lists_issues.html
> 
> 
> -----Original Message-----
> From: Minifie, Todd [mailto:todd.minifie@cgi.com] 
> Sent: Friday, May 08, 2009 3:21 PM
> To: Apache AXIS C Developers List
> Subject: Take me off of the mailing list PLEASE.
> 
> 
> 
> -----Original Message-----
> From: David K. Taylor (JIRA) [mailto:jira@apache.org] 
> Sent: Friday, May 08, 2009 11:28 AM
> To: axis-c-dev@ws.apache.org
> Subject: [jira] Updated: (AXIS2C-1265) guththila does not support Chinese and the Japanese.
> 
> 
> [ https://issues.apache.org/jira/browse/AXIS2C-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
> 
> David K. Taylor updated AXIS2C-1265:
> ------------------------------------
> 
> Attachment: utf8-patch.txt
> 
> This patch provides UTF-8 support when reading SOAP messages through Guththila. Since libiconv is optional and not required, I hand coded a UTF-8 transcoder, though since I don't use libiconv I didn't add optional code to use it. That would be a good addition.
> 
> This patch was built successfully on the official 1.6.0 release. It also includes unit tests under guththila/tests for the new transcoder (both decode and encode, though only decode is really used). To run these tests, since they are not executed as part of the regular "make check" target, use these commands:
> 
> cd guththila/tests
> ./s
> ./reader
> 
> The decoder test takes a few minutes since it covers the entire Unicode code point space.
> 
> This patch does not completely solve the UTF-8 issue, but handles the most common case. These issues remain:
> 
> 1) Still uses isspace and isalpha for XML tag names and attribute names, which depend on the locale set in the environment.
> 
> 2) Only accepts UTF-8, not other encodings. (Using iconv could improve this as well.)
> 
> 3) Ignores possible encoding set in XML declarative.
> 
> 4) Ignores possible encoding set in HTTP Content-Type.
> 
> 5) Only allows invalid UTF-8 bytes to be ignored. Should have option to escape them instead.
> 
> > guththila does not support Chinese and the Japanese.
> > ----------------------------------------------------
> >
> > Key: AXIS2C-1265
> > URL: https://issues.apache.org/jira/browse/AXIS2C-1265
> > Project: Axis2-C
> > Issue Type: Bug
> > Components: guththila
> > Affects Versions: 1.5.0
> > Environment: windows xp sp2 japan
> > Reporter: songlei
> > Attachments: utf8-patch.txt
> >
> >
> > data:
> > a.xml
> > <?xml version='1.0' encoding='UTF-8'?>
> > <ns:parameter xmlns:ns="urn:ns">
> > <ns:unit xmlns:ns="urn:ns">
> > <ns:name>name</ns:name>
> > <ns:type>1</ns:type>
> > <ns:displayname>門雷:名前</ns:displayname>��> �<ns:value>2</ns:value>��> </ns:unit>��> </ns:parameter>��> ---------------------------------------------------------------------��> code:��> axiom_node_t *root_node = NULL;��> axiom_node_t *child = NULL;��> axiom_document_t *document = NULL;��> axiom_stax_builder_t *om_builder = NULL;��> axiom_xml_reader_t *xml_reader = NULL;��> f = fopen("a.xml","r");��> xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");��> om_builder = axiom_stax_builder_create(env, xml_reader);��> document = axiom_stax_builder_get_document(om_builder, env);��> root_node = axiom_document_get_root_element(document, env);��> axiom_document_build_all(document, env);��> child = axiom_node_get_first_child(root_node, env);��> --------------------------------------------------------------------------------------------��> result:��> The analysis result is under shows:��> <ns:parameter xmlns:ns="urn:ns">��> <ns:unit xmlns:ns="urn:ns">��> �<ns:name>name</ns:name>��> �<ns:type>1</ns:type>��> �<ns:displayname></ns:displayname>��> </ns:unit>��> </ns:parameter>��> displayname and value lost��> ---------------------------------------------------------------------------------------------------------------��> debug:��> .¥axis2c¥guththila¥src¥guththila_xml_parser.c��> 1532 c = m->buffer.buff[m->buffer.cur_buff][m->next++ -��> 1533 ��> GUTHTHILA_BUFFER_PRE_DATA_SIZE��> 1534 (m->buffer)];��> 1535 return c >= 0 ? c : -1;��> c is int.��> m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.��> char scope is - 127‾128.��> char[i] char [i+1] == 門��> char[i]  > 128��> char Convert int, c < 0��> om_builder-done = true.����-- ��This message is automatically generated by JIRA.��-��You can reply to this email to add a comment to the issue online.����
> 
> ---------------------------------------------------
> Confidentiality Notice: This electronic mail transmission is confidential, 
> may be privileged and should be read or retained only by the intended
> recipient. If you have received this transmission in error, please
> immediately notify the sender and delete it from your system.

_________________________________________________________________
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009

RE: Take me off of the mailing list PLEASE.

Posted by Hatim Daginawala <Ha...@argodata.com>.
It costs USD 20.00 to get off of this list.
Would you like to send in a check or pay with the credit card?

http://ws.apache.org/axis2/c/lists_issues.html


-----Original Message-----
From: Minifie, Todd [mailto:todd.minifie@cgi.com] 
Sent: Friday, May 08, 2009 3:21 PM
To: Apache AXIS C Developers List
Subject: Take me off of the mailing list PLEASE.



-----Original Message-----
From: David K. Taylor (JIRA) [mailto:jira@apache.org] 
Sent: Friday, May 08, 2009 11:28 AM
To: axis-c-dev@ws.apache.org
Subject: [jira] Updated: (AXIS2C-1265) guththila does not support Chinese and the Japanese.


     [ https://issues.apache.org/jira/browse/AXIS2C-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David K. Taylor updated AXIS2C-1265:
------------------------------------

    Attachment: utf8-patch.txt

This patch provides UTF-8 support when reading SOAP messages through Guththila.  Since libiconv is optional and not required, I hand coded a UTF-8 transcoder, though since I don't use libiconv I didn't add optional code to use it.  That would be a good addition.

This patch was built successfully on the official 1.6.0 release.  It also includes unit tests under guththila/tests for the new transcoder (both decode and encode, though only decode is really used).  To run these tests, since they are not executed as part of the regular "make check" target, use these commands:

cd guththila/tests
./s
./reader

The decoder test takes a few minutes since it covers the entire Unicode code point space.

This patch does not completely solve the UTF-8 issue, but handles the most common case.  These issues remain:

1) Still uses isspace and isalpha for XML tag names and attribute names, which depend on the locale set in the environment.

2) Only accepts UTF-8, not other encodings.  (Using iconv could improve this as well.)

3) Ignores possible encoding set in XML declarative.

4) Ignores possible encoding set in HTTP Content-Type.

5) Only allows invalid UTF-8 bytes to be ignored.  Should have option to escape them instead.

> guththila does not support Chinese and the Japanese.
> ----------------------------------------------------
>
>                 Key: AXIS2C-1265
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1265
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila
>    Affects Versions: 1.5.0
>         Environment: windows xp sp2 japan
>            Reporter: songlei
>         Attachments: utf8-patch.txt
>
>
> data:
> a.xml
> <?xml version='1.0' encoding='UTF-8'?>
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname>門雷:名前</ns:displayname>��> �<ns:value>2</ns:value>��> </ns:unit>��> </ns:parameter>��> ---------------------------------------------------------------------��> code:��> axiom_node_t *root_node = NULL;��> axiom_node_t *child = NULL;��> axiom_document_t *document = NULL;��> axiom_stax_builder_t *om_builder = NULL;��> axiom_xml_reader_t *xml_reader = NULL;��> f = fopen("a.xml","r");��> xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");��> om_builder = axiom_stax_builder_create(env, xml_reader);��> document = axiom_stax_builder_get_document(om_builder, env);��> root_node = axiom_document_get_root_element(document, env);��> axiom_document_build_all(document, env);��> child = axiom_node_get_first_child(root_node, env);��> --------------------------------------------------------------------------------------------��> result:��> The analysis result is under shows:��> <ns:parameter xmlns:ns="urn:ns">��> <ns:unit xmlns:ns="urn:ns">��> �<ns:name>name</ns:name>��> �<ns:type>1</ns:type>��> �<ns:displayname></ns:displayname>��> </ns:unit>��> </ns:parameter>��> displayname and value lost��> ---------------------------------------------------------------------------------------------------------------��> debug:��> .¥axis2c¥guththila¥src¥guththila_xml_parser.c��> 1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -��> 1533 ��> GUTHTHILA_BUFFER_PRE_DATA_SIZE��> 1534                                                    (m->buffer)];��> 1535            return c >= 0 ? c : -1;��> c is int.��> m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.��> char scope is - 127‾128.��> char[i] char [i+1]  == 門��> char[i]  > 128��> char Convert int, c < 0��> om_builder-done = true.����-- ��This message is automatically generated by JIRA.��-��You can reply to this email to add a comment to the issue online.����

---------------------------------------------------
Confidentiality Notice:  This electronic mail transmission is confidential, 
may be privileged and should be read or retained only by the intended
recipient.  If you have received this transmission in error, please
immediately notify the sender and delete it from your system.

Take me off of the mailing list PLEASE.

Posted by "Minifie, Todd" <to...@cgi.com>.

-----Original Message-----
From: David K. Taylor (JIRA) [mailto:jira@apache.org] 
Sent: Friday, May 08, 2009 11:28 AM
To: axis-c-dev@ws.apache.org
Subject: [jira] Updated: (AXIS2C-1265) guththila does not support Chinese and the Japanese.


     [ https://issues.apache.org/jira/browse/AXIS2C-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David K. Taylor updated AXIS2C-1265:
------------------------------------

    Attachment: utf8-patch.txt

This patch provides UTF-8 support when reading SOAP messages through Guththila.  Since libiconv is optional and not required, I hand coded a UTF-8 transcoder, though since I don't use libiconv I didn't add optional code to use it.  That would be a good addition.

This patch was built successfully on the official 1.6.0 release.  It also includes unit tests under guththila/tests for the new transcoder (both decode and encode, though only decode is really used).  To run these tests, since they are not executed as part of the regular "make check" target, use these commands:

cd guththila/tests
./s
./reader

The decoder test takes a few minutes since it covers the entire Unicode code point space.

This patch does not completely solve the UTF-8 issue, but handles the most common case.  These issues remain:

1) Still uses isspace and isalpha for XML tag names and attribute names, which depend on the locale set in the environment.

2) Only accepts UTF-8, not other encodings.  (Using iconv could improve this as well.)

3) Ignores possible encoding set in XML declarative.

4) Ignores possible encoding set in HTTP Content-Type.

5) Only allows invalid UTF-8 bytes to be ignored.  Should have option to escape them instead.

> guththila does not support Chinese and the Japanese.
> ----------------------------------------------------
>
>                 Key: AXIS2C-1265
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1265
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila
>    Affects Versions: 1.5.0
>         Environment: windows xp sp2 japan
>            Reporter: songlei
>         Attachments: utf8-patch.txt
>
>
> data:
> a.xml
> <?xml version='1.0' encoding='UTF-8'?>
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname>門雷:名前</ns:displayname>
> 	<ns:value>2</ns:value>
> </ns:unit>
> </ns:parameter>
> ---------------------------------------------------------------------
> code:
> axiom_node_t *root_node = NULL;
> axiom_node_t *child = NULL;
> axiom_document_t *document = NULL;
> axiom_stax_builder_t *om_builder = NULL;
> axiom_xml_reader_t *xml_reader = NULL;
> f = fopen("a.xml","r");
> xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
> om_builder = axiom_stax_builder_create(env, xml_reader);
> document = axiom_stax_builder_get_document(om_builder, env);
> root_node = axiom_document_get_root_element(document, env);
> axiom_document_build_all(document, env);
> child = axiom_node_get_first_child(root_node, env);
> --------------------------------------------------------------------------------------------
> result:
> The analysis result is under shows:
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname></ns:displayname>
> </ns:unit>
> </ns:parameter>
> displayname and value lost
> ---------------------------------------------------------------------------------------------------------------
> debug:
> .¥axis2c¥guththila¥src¥guththila_xml_parser.c
> 1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
> 1533 
> GUTHTHILA_BUFFER_PRE_DATA_SIZE
> 1534                                                    (m->buffer)];
> 1535            return c >= 0 ? c : -1;
> c is int.
> m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
> char scope is - 127‾128.
> char[i] char [i+1]  == 門
> char[i]  > 128
> char Convert int, c < 0
> om_builder-done = true.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS2C-1265) guththila does not support Chinese and the Japanese.

Posted by "songlei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

songlei updated AXIS2C-1265:
----------------------------

    Description: 
data:

a.xml
<?xml version='1.0' encoding='UTF-8'?>
<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>門雷:名前</ns:displayname>
	<ns:value>2</ns:value>
</ns:unit>
</ns:parameter>
---------------------------------------------------------------------
code:

axiom_node_t *root_node = NULL;
axiom_node_t *child = NULL;
axiom_document_t *document = NULL;
axiom_stax_builder_t *om_builder = NULL;
axiom_xml_reader_t *xml_reader = NULL;

f = fopen("a.xml","r");
xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
om_builder = axiom_stax_builder_create(env, xml_reader);
document = axiom_stax_builder_get_document(om_builder, env);
root_node = axiom_document_get_root_element(document, env);
axiom_document_build_all(document, env);
child = axiom_node_get_first_child(root_node, env);

--------------------------------------------------------------------------------------------
result:

The analysis result is under shows:

<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>門雷:名前</ns:displayname>
</ns:unit>
</ns:parameter>

value lost

---------------------------------------------------------------------------------------------------------------
debug:

.\axis2c\guththila\src\guththila_xml_parser.c
1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
1533 
GUTHTHILA_BUFFER_PRE_DATA_SIZE
1534                                                    (m->buffer)];
1535            return c >= 0 ? c : -1;

c is int.
m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
char scope is - 127~128.
char[i] char [i+1]  == 門
char[i]  > 128
char Convert int, c < 0

om_builder-done = true.





  was:
data:

a.xml
<?xml version='1.0' encoding='UTF-8'?>
<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>名前</ns:displayname>
	<ns:value>2</ns:value>
</ns:unit>
</ns:parameter>
---------------------------------------------------------------------
code:

axiom_node_t *root_node = NULL;
axiom_node_t *child = NULL;
axiom_document_t *document = NULL;
axiom_stax_builder_t *om_builder = NULL;
axiom_xml_reader_t *xml_reader = NULL;

f = fopen("a.xml","r");
xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
om_builder = axiom_stax_builder_create(env, xml_reader);
document = axiom_stax_builder_get_document(om_builder, env);
root_node = axiom_document_get_root_element(document, env);
axiom_document_build_all(document, env);
child = axiom_node_get_first_child(root_node, env);

--------------------------------------------------------------------------------------------
result:

The analysis result is under shows:

<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>門雷:名前</ns:displayname>
</ns:unit>
</ns:parameter>

value lost

---------------------------------------------------------------------------------------------------------------
debug:

.\axis2c\guththila\src\guththila_xml_parser.c
1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
1533 
GUTHTHILA_BUFFER_PRE_DATA_SIZE
1534                                                    (m->buffer)];
1535            return c >= 0 ? c : -1;

c is int.
m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
char scope is - 127~128.
char[i] char [i+1]  == 門
char[i]  > 128
char becomes int, c < 0

om_builder-done = true.






> guththila does not support Chinese and the Japanese.
> ----------------------------------------------------
>
>                 Key: AXIS2C-1265
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1265
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila
>    Affects Versions: 1.5.0
>         Environment: windows xp sp2 japan
>            Reporter: songlei
>             Fix For: 1.5.0
>
>
> data:
> a.xml
> <?xml version='1.0' encoding='UTF-8'?>
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname>門雷:名前</ns:displayname>
> 	<ns:value>2</ns:value>
> </ns:unit>
> </ns:parameter>
> ---------------------------------------------------------------------
> code:
> axiom_node_t *root_node = NULL;
> axiom_node_t *child = NULL;
> axiom_document_t *document = NULL;
> axiom_stax_builder_t *om_builder = NULL;
> axiom_xml_reader_t *xml_reader = NULL;
> f = fopen("a.xml","r");
> xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
> om_builder = axiom_stax_builder_create(env, xml_reader);
> document = axiom_stax_builder_get_document(om_builder, env);
> root_node = axiom_document_get_root_element(document, env);
> axiom_document_build_all(document, env);
> child = axiom_node_get_first_child(root_node, env);
> --------------------------------------------------------------------------------------------
> result:
> The analysis result is under shows:
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname>門雷:名前</ns:displayname>
> </ns:unit>
> </ns:parameter>
> value lost
> ---------------------------------------------------------------------------------------------------------------
> debug:
> .\axis2c\guththila\src\guththila_xml_parser.c
> 1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
> 1533 
> GUTHTHILA_BUFFER_PRE_DATA_SIZE
> 1534                                                    (m->buffer)];
> 1535            return c >= 0 ? c : -1;
> c is int.
> m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
> char scope is - 127~128.
> char[i] char [i+1]  == 門
> char[i]  > 128
> char Convert int, c < 0
> om_builder-done = true.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1265) guththila does not support Chinese and the Japanese.

Posted by "S.Uthaiyashankar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

S.Uthaiyashankar updated AXIS2C-1265:
-------------------------------------

    Fix Version/s:     (was: 1.5.0)

> guththila does not support Chinese and the Japanese.
> ----------------------------------------------------
>
>                 Key: AXIS2C-1265
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1265
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila
>    Affects Versions: 1.5.0
>         Environment: windows xp sp2 japan
>            Reporter: songlei
>
> data:
> a.xml
> <?xml version='1.0' encoding='UTF-8'?>
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname>門雷:名前</ns:displayname>
> 	<ns:value>2</ns:value>
> </ns:unit>
> </ns:parameter>
> ---------------------------------------------------------------------
> code:
> axiom_node_t *root_node = NULL;
> axiom_node_t *child = NULL;
> axiom_document_t *document = NULL;
> axiom_stax_builder_t *om_builder = NULL;
> axiom_xml_reader_t *xml_reader = NULL;
> f = fopen("a.xml","r");
> xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
> om_builder = axiom_stax_builder_create(env, xml_reader);
> document = axiom_stax_builder_get_document(om_builder, env);
> root_node = axiom_document_get_root_element(document, env);
> axiom_document_build_all(document, env);
> child = axiom_node_get_first_child(root_node, env);
> --------------------------------------------------------------------------------------------
> result:
> The analysis result is under shows:
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname></ns:displayname>
> </ns:unit>
> </ns:parameter>
> displayname and value lost
> ---------------------------------------------------------------------------------------------------------------
> debug:
> .\axis2c\guththila\src\guththila_xml_parser.c
> 1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
> 1533 
> GUTHTHILA_BUFFER_PRE_DATA_SIZE
> 1534                                                    (m->buffer)];
> 1535            return c >= 0 ? c : -1;
> c is int.
> m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
> char scope is - 127~128.
> char[i] char [i+1]  == 門
> char[i]  > 128
> char Convert int, c < 0
> om_builder-done = true.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AXIS2C-1265) guththila does not support Chinese and the Japanese.

Posted by "songlei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

songlei updated AXIS2C-1265:
----------------------------

    Description: 
data:

a.xml
<?xml version='1.0' encoding='UTF-8'?>
<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>門雷:名前</ns:displayname>
	<ns:value>2</ns:value>
</ns:unit>
</ns:parameter>
---------------------------------------------------------------------
code:

axiom_node_t *root_node = NULL;
axiom_node_t *child = NULL;
axiom_document_t *document = NULL;
axiom_stax_builder_t *om_builder = NULL;
axiom_xml_reader_t *xml_reader = NULL;

f = fopen("a.xml","r");
xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
om_builder = axiom_stax_builder_create(env, xml_reader);
document = axiom_stax_builder_get_document(om_builder, env);
root_node = axiom_document_get_root_element(document, env);
axiom_document_build_all(document, env);
child = axiom_node_get_first_child(root_node, env);

--------------------------------------------------------------------------------------------
result:

The analysis result is under shows:

<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname></ns:displayname>
</ns:unit>
</ns:parameter>

displayname and value lost

---------------------------------------------------------------------------------------------------------------
debug:

.\axis2c\guththila\src\guththila_xml_parser.c
1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
1533 
GUTHTHILA_BUFFER_PRE_DATA_SIZE
1534                                                    (m->buffer)];
1535            return c >= 0 ? c : -1;

c is int.
m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
char scope is - 127~128.
char[i] char [i+1]  == 門
char[i]  > 128
char Convert int, c < 0

om_builder-done = true.





  was:
data:

a.xml
<?xml version='1.0' encoding='UTF-8'?>
<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>門雷:名前</ns:displayname>
	<ns:value>2</ns:value>
</ns:unit>
</ns:parameter>
---------------------------------------------------------------------
code:

axiom_node_t *root_node = NULL;
axiom_node_t *child = NULL;
axiom_document_t *document = NULL;
axiom_stax_builder_t *om_builder = NULL;
axiom_xml_reader_t *xml_reader = NULL;

f = fopen("a.xml","r");
xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
om_builder = axiom_stax_builder_create(env, xml_reader);
document = axiom_stax_builder_get_document(om_builder, env);
root_node = axiom_document_get_root_element(document, env);
axiom_document_build_all(document, env);
child = axiom_node_get_first_child(root_node, env);

--------------------------------------------------------------------------------------------
result:

The analysis result is under shows:

<ns:parameter xmlns:ns="urn:ns">
<ns:unit xmlns:ns="urn:ns">
	<ns:name>name</ns:name>
	<ns:type>1</ns:type>
	<ns:displayname>門雷:名前</ns:displayname>
</ns:unit>
</ns:parameter>

value lost

---------------------------------------------------------------------------------------------------------------
debug:

.\axis2c\guththila\src\guththila_xml_parser.c
1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
1533 
GUTHTHILA_BUFFER_PRE_DATA_SIZE
1534                                                    (m->buffer)];
1535            return c >= 0 ? c : -1;

c is int.
m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
char scope is - 127~128.
char[i] char [i+1]  == 門
char[i]  > 128
char Convert int, c < 0

om_builder-done = true.






> guththila does not support Chinese and the Japanese.
> ----------------------------------------------------
>
>                 Key: AXIS2C-1265
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1265
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila
>    Affects Versions: 1.5.0
>         Environment: windows xp sp2 japan
>            Reporter: songlei
>             Fix For: 1.5.0
>
>
> data:
> a.xml
> <?xml version='1.0' encoding='UTF-8'?>
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname>門雷:名前</ns:displayname>
> 	<ns:value>2</ns:value>
> </ns:unit>
> </ns:parameter>
> ---------------------------------------------------------------------
> code:
> axiom_node_t *root_node = NULL;
> axiom_node_t *child = NULL;
> axiom_document_t *document = NULL;
> axiom_stax_builder_t *om_builder = NULL;
> axiom_xml_reader_t *xml_reader = NULL;
> f = fopen("a.xml","r");
> xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
> om_builder = axiom_stax_builder_create(env, xml_reader);
> document = axiom_stax_builder_get_document(om_builder, env);
> root_node = axiom_document_get_root_element(document, env);
> axiom_document_build_all(document, env);
> child = axiom_node_get_first_child(root_node, env);
> --------------------------------------------------------------------------------------------
> result:
> The analysis result is under shows:
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname></ns:displayname>
> </ns:unit>
> </ns:parameter>
> displayname and value lost
> ---------------------------------------------------------------------------------------------------------------
> debug:
> .\axis2c\guththila\src\guththila_xml_parser.c
> 1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
> 1533 
> GUTHTHILA_BUFFER_PRE_DATA_SIZE
> 1534                                                    (m->buffer)];
> 1535            return c >= 0 ? c : -1;
> c is int.
> m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
> char scope is - 127~128.
> char[i] char [i+1]  == 門
> char[i]  > 128
> char Convert int, c < 0
> om_builder-done = true.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1265) guththila does not support Chinese and the Japanese.

Posted by "David K. Taylor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David K. Taylor updated AXIS2C-1265:
------------------------------------

    Attachment: utf8-patch.txt

This patch provides UTF-8 support when reading SOAP messages through Guththila.  Since libiconv is optional and not required, I hand coded a UTF-8 transcoder, though since I don't use libiconv I didn't add optional code to use it.  That would be a good addition.

This patch was built successfully on the official 1.6.0 release.  It also includes unit tests under guththila/tests for the new transcoder (both decode and encode, though only decode is really used).  To run these tests, since they are not executed as part of the regular "make check" target, use these commands:

cd guththila/tests
./s
./reader

The decoder test takes a few minutes since it covers the entire Unicode code point space.

This patch does not completely solve the UTF-8 issue, but handles the most common case.  These issues remain:

1) Still uses isspace and isalpha for XML tag names and attribute names, which depend on the locale set in the environment.

2) Only accepts UTF-8, not other encodings.  (Using iconv could improve this as well.)

3) Ignores possible encoding set in XML declarative.

4) Ignores possible encoding set in HTTP Content-Type.

5) Only allows invalid UTF-8 bytes to be ignored.  Should have option to escape them instead.

> guththila does not support Chinese and the Japanese.
> ----------------------------------------------------
>
>                 Key: AXIS2C-1265
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1265
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila
>    Affects Versions: 1.5.0
>         Environment: windows xp sp2 japan
>            Reporter: songlei
>         Attachments: utf8-patch.txt
>
>
> data:
> a.xml
> <?xml version='1.0' encoding='UTF-8'?>
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname>門雷:名前</ns:displayname>
> 	<ns:value>2</ns:value>
> </ns:unit>
> </ns:parameter>
> ---------------------------------------------------------------------
> code:
> axiom_node_t *root_node = NULL;
> axiom_node_t *child = NULL;
> axiom_document_t *document = NULL;
> axiom_stax_builder_t *om_builder = NULL;
> axiom_xml_reader_t *xml_reader = NULL;
> f = fopen("a.xml","r");
> xml_reader = axiom_xml_reader_create_for_io(env, read_input_callback, close_input_callback, NULL, "UTF-8");
> om_builder = axiom_stax_builder_create(env, xml_reader);
> document = axiom_stax_builder_get_document(om_builder, env);
> root_node = axiom_document_get_root_element(document, env);
> axiom_document_build_all(document, env);
> child = axiom_node_get_first_child(root_node, env);
> --------------------------------------------------------------------------------------------
> result:
> The analysis result is under shows:
> <ns:parameter xmlns:ns="urn:ns">
> <ns:unit xmlns:ns="urn:ns">
> 	<ns:name>name</ns:name>
> 	<ns:type>1</ns:type>
> 	<ns:displayname></ns:displayname>
> </ns:unit>
> </ns:parameter>
> displayname and value lost
> ---------------------------------------------------------------------------------------------------------------
> debug:
> .\axis2c\guththila\src\guththila_xml_parser.c
> 1532            c = m->buffer.buff[m->buffer.cur_buff][m->next++ -
> 1533 
> GUTHTHILA_BUFFER_PRE_DATA_SIZE
> 1534                                                    (m->buffer)];
> 1535            return c >= 0 ? c : -1;
> c is int.
> m->buffer.buff[m->buffer.cur_buff][m->next++ - GUTHTHILA_BUFFER_PRE_DATA_SIZE (m->buffer)] is char.
> char scope is - 127~128.
> char[i] char [i+1]  == 門
> char[i]  > 128
> char Convert int, c < 0
> om_builder-done = true.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.