From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 08/11] Add a buffer size parameter to convert_utf8_to_gsm
Date: Tue, 01 Jun 2010 18:50:09 -0500 [thread overview]
Message-ID: <201006011850.10018.denkenz@gmail.com> (raw)
In-Reply-To: <1275310044-27469-8-git-send-email-andrew.zaborowski@intel.com>
[-- Attachment #1: Type: text/plain, Size: 959 bytes --]
Hi Andrew,
> This is needed when encoding a string into gsm that needs to fit a
> in a given number of bytes. Just taking the first N bytes of the
> resulting string may leave you with byte 1 of a two-byte character at
> the end of the buffer. As far as I can tell there's no easier way to
> avoid that.
In gsm it is actually pretty easy, the escape character for two-byte sequence
is always 0x1b, so chopping a string up could be done quite easily.
> unsigned char *convert_utf8_to_gsm_with_lang(const char *text, long len,
> long *items_read, long *items_written, unsigned char terminator,
> + long max_size,
> enum gsm_dialect locking_shift_lang,
> enum gsm_dialect single_shift_lang);
If there's still need for this, I'd prefer we reuse long *items_written as an
in/out argument for the max size or add another function entirely, adding yet
another int argument is getting a bit ridiculous.
Regards,
-Denis
next prev parent reply other threads:[~2010-06-01 23:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-31 12:47 [PATCH 01/11] stkutil: Add SMS-PP Data Download envelope builder Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 02/11] test-stkutil: Tests for " Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 03/11] stkutil: Add CBS-PP " Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 04/11] stk: Use envelope encoding utility from stkutil.c Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 05/11] test-stkutil: Tests for CBS-PP Data Download envelope builder Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 06/11] stkutil: Add the Menu Selection " Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 07/11] test-stkutil: Tests for " Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 08/11] Add a buffer size parameter to convert_utf8_to_gsm Andrzej Zaborowski
2010-06-01 23:50 ` Denis Kenzior [this message]
2010-05-31 12:47 ` [PATCH 09/11] Add a "sim string" encoding utility Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 10/11] stkutil: Add the Call Control envelope builder Andrzej Zaborowski
2010-06-01 22:28 ` Andrzej Zaborowski
2010-05-31 12:47 ` [PATCH 11/11] test-stkutil: Tests for " Andrzej Zaborowski
2010-06-01 23:50 ` [PATCH 01/11] stkutil: Add SMS-PP Data Download " Denis Kenzior
2010-06-03 9:53 ` Andrzej Zaborowski
2010-06-03 15:32 ` Denis Kenzior
2010-06-07 13:25 ` Andrzej Zaborowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201006011850.10018.denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox