regarding PtTranslateToUtf

what’s the max number of bytes a international character can take? Because
I’m uisng PtTranslateToUtf., with
Western European as the encoding source, I need to make sure I got enough
space in my destination buffer to hold the new utf8 char array… all the
international characters I tried return 2 bytes…

Use UTF8_CUR_MAX, as defined in <utf8.h>

“ran zhang” <rzhang@vamcointernational.com> wrote in message
news:a4u3fq$1sq$1@inn.qnx.com

what’s the max number of bytes a international character can take? Because
I’m uisng PtTranslateToUtf., with
Western European as the encoding source, I need to make sure I got enough
space in my destination buffer to hold the new utf8 char array… all the
international characters I tried return 2 bytes…

\

I’m using qnx4, I can’t find this header <utf8.h> , any idea?
David LeBlanc <dleblanc@qnx.com> wrote in message
news:a4ubo7$b5g$1@nntp.qnx.com

Use UTF8_CUR_MAX, as defined in <utf8.h

“ran zhang” <> rzhang@vamcointernational.com> > wrote in message
news:a4u3fq$1sq$> 1@inn.qnx.com> …
what’s the max number of bytes a international character can take?
Because
I’m uisng PtTranslateToUtf., with
Western European as the encoding source, I need to make sure I got
enough
space in my destination buffer to hold the new utf8 char array… all the
international characters I tried return 2 bytes…



\

“ran zhang” <rzhang@vamcointernational.com> wrote in message
news:a504sa$gj6$1@inn.qnx.com

I’m using qnx4,

This is a QNX6 newsgroup Try asking in the QNX4 photon related newsgroup

I can’t find this header <utf8.h> , any idea?



David LeBlanc <> dleblanc@qnx.com> > wrote in message
news:a4ubo7$b5g$> 1@nntp.qnx.com> …
Use UTF8_CUR_MAX, as defined in <utf8.h

“ran zhang” <> rzhang@vamcointernational.com> > wrote in message
news:a4u3fq$1sq$> 1@inn.qnx.com> …
what’s the max number of bytes a international character can take?
Because
I’m uisng PtTranslateToUtf., with
Western European as the encoding source, I need to make sure I got
enough
space in my destination buffer to hold the new utf8 char array… all
the
international characters I tried return 2 bytes…





\

Mario’s right :slight_smile:

But if you’re in qnx4, MB_CUR_MAX should be ok to use instead of
UTF8_CUR_MAX. This is defined in <stdlib.h>.


“Mario Charest” <goto@nothingness.com> wrote in message
news:a505nu$gut$1@inn.qnx.com

“ran zhang” <> rzhang@vamcointernational.com> > wrote in message
news:a504sa$gj6$> 1@inn.qnx.com> …
I’m using qnx4,

This is a QNX6 newsgroup Try asking in the QNX4 photon related newsgroup

I can’t find this header <utf8.h> , any idea?


David LeBlanc <> dleblanc@qnx.com> > wrote in message
news:a4ubo7$b5g$> 1@nntp.qnx.com> …
Use UTF8_CUR_MAX, as defined in <utf8.h

“ran zhang” <> rzhang@vamcointernational.com> > wrote in message
news:a4u3fq$1sq$> 1@inn.qnx.com> …
what’s the max number of bytes a international character can take?
Because
I’m uisng PtTranslateToUtf., with
Western European as the encoding source, I need to make sure I got
enough
space in my destination buffer to hold the new utf8 char array… all
the
international characters I tried return 2 bytes…







\