Home | History | Annotate | Download | only in telephony

Lines Matching full:utf8

360 utf8_skip( cbytes_t   utf8,
364 cbytes_t p = utf8;
412 utf8_write( bytes_t utf8, int offset, int v )
418 if (utf8)
419 utf8[offset] = (byte_t) v;
422 if (utf8) {
423 utf8[offset+0] = (byte_t)( 0xc0 | (v >> 6) );
424 utf8[offset+1] = (byte_t)( 0x80 | (v & 0x3f) );
428 if (utf8) {
429 utf8[offset+0] = (byte_t)( 0xe0 | (v >> 12) );
430 utf8[offset+1] = (byte_t)( 0x80 | ((v >> 6) & 0x3f) );
431 utf8[offset+2] = (byte_t)( 0x80 | (v & 0x3f) );
435 if (utf8) {
436 utf8[offset+0] = (byte_t)( 0xf0 | ((v >> 18) & 0x7) );
437 utf8[offset+1] = (byte_t)( 0x80 | ((v >> 12) & 0x3f) );
438 utf8[offset+2] = (byte_t)( 0x80 | ((v >> 6) & 0x3f) );
439 utf8[offset+3] = (byte_t)( 0x80 | (v & 0x3f) );
493 /** UCS2 to UTF8
496 /* convert a UCS2 string into a UTF8 byte string, assumes 'buf' is correctly sized */
512 /* count the number of UCS2 chars contained in a utf8 byte string */
514 utf8_to_ucs2( cbytes_t utf8,
518 cbytes_t p = utf8;
608 utf8_skip_gsm7( cbytes_t utf8, cbytes_t utf8end, int gsm7len )
610 cbytes_t p = utf8;
636 utf8_check_gsm7( cbytes_t utf8,
639 cbytes_t utf8end = utf8 + utf8len;
641 while (utf8 < utf8end) {
642 int c = utf8_next( &utf8, utf8end );
654 bytes_t utf8 )
679 result += utf8_write( utf8, result, v );
693 utf8_from_gsm8( cbytes_t src, int count, bytes_t utf8 )
726 result += utf8_write( utf8, result, c );
777 /* count the number of septets required to write a utf8 string */
779 utf8_to_gsm7_count( cbytes_t utf8, int utf8len )
781 cbytes_t utf8end = utf8 + utf8len;
784 while ( utf8 < utf8end ) {
786 int c = utf8_next( &utf8, utf8end );
848 /* convert a utf8 string to a gsm7 byte string - return the number of septets written */
850 utf8_to_gsm7( cbytes_t utf8, int utf8len, bytes_t dst, int offset )
852 const unsigned char* utf8end = utf8 + utf8len;
856 return utf8_to_gsm7_count(utf8, utf8len);
859 while ( utf8 < utf8end ) {
860 int c = utf8_next( &utf8, utf8end );
887 utf8_to_gsm8( cbytes_t utf8, int utf8len, bytes_t dst )
889 const unsigned char* utf8end = utf8 + utf8len;
892 while ( utf8 < utf8end ) {
893 int c = utf8_next( &utf8, utf8end );
1135 sim_adn_alpha_from_utf8( cbytes_t utf8, int utf8len, bytes_t dst )
1139 if (utf8_check_gsm7(utf8, utf8len)) {
1141 result = utf8_to_gsm8(utf8, utf8len, dst);
1147 result = 1 + utf8_to_ucs2(utf8, utf8len, dst ? (dst+1) : NULL)*2;