On 1/2/07, Anders Hammar <[EMAIL PROTECTED]> wrote:

This question is related to a former topic on ISO-8859-1 encoded messages in
smx and also the jiras related to my problem with Swedish characters. I've
realized that I might have been on the wrong track (thinking that I have to
use ISO-8859-1 for Swedish characters) and that UTF-8 should cover my needs
(even though incoming messages could be in a different encoding due to other
applications). However, I'd like to get some info regarding the basic
thinking of encoding in smx. Hopefully someone can help me.

Here's my questions:
1. Is incoming xml messages (through jmsBC or httpBC for instance) of any
encoding (ISO-8859-1, UTF-8, UTF-16, etc.) supported?

All encodings should be supported (well, depending on the JVM of course).

2. Is the idea that all messages should be converted to one single encoding
internally (UTF-8 by default)?

Hum ... I'm not sure this question really makes sense.  Let me explain.
Encoding is used to read and write strings from / to a byte array.  When
reading a byte array, the encoding will determine how these bytes are
converted to a character array.  Note that a single character is represented
by a 16 bits word in memory.  So, once the string has been read, there is
no more any encoding: a string in memory is independent of the encoding
used to read it.  The same applies to xml, but one difference is that
the encoding
can be carried by the data itself: note that some combinations are not valid
when parsing an xml from a byte[].

3. What about outgoing messages (through jmsBC or httpBC for instance),
would it be possible to use different encoding than the one internally used?
(not a must for me, but would probably be good for any integration product)

Yeah, I guess it would be better to be able to specify the encoding

4. Faults and return messages, what encoding will be used? The one of the
incoming message?

Yeah, I think so.  Maybe it could be overridden too, but defaulting to the
input message encoding sounds good to me.  But remember this should not
be a problem provided that the client is able to read UTF-8.


Any extra info or clarification is very much appreciated, thanks!

--
View this message in context: 
http://www.nabble.com/Basic-smx-encoding-principles-tf2907619s12049.html#a8123268
Sent from the ServiceMix - User mailing list archive at Nabble.com.




--
Cheers,
Guillaume Nodet

Reply via email to