From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 1/9] stkutil: display text attributes as html
Date: Fri, 09 Jul 2010 17:13:57 -0500 [thread overview]
Message-ID: <4C379F25.9090302@gmail.com> (raw)
In-Reply-To: <20100709145826.17b28eae@kcaccard-MOBL3>
[-- Attachment #1: Type: text/plain, Size: 2316 bytes --]
Hi Kristen,
> I agree with you that this does not match the spec. I did this
> deliberately, because I had a problem deciding how to deal with
> the test case which you requested I include, which was defined
> in test_sms.c (header_test). I included the test case below
> for your reference.
>
> static struct html_attr_test html_attr_data_1 = {
> .text = "EMS messages can contain italic, bold, large, small and "
> "colored text",
> .text_attr = {
> .len = 20,
> .attributes = { 0x19, 0x06, 0x20, 0x00, 0x21, 0x04, 0x10, 0x00,
> 0x27, 0x05, 0x04, 0x00, 0x2E, 0x05, 0x08, 0x00,
> 0x38, 0x07, 0x00, 0x2B },
> },
> .html = "EMS messages can contain <span style=\"font-style: "
> "italic;\">italic</span>, <span style=\"font-weight: bold;\">"
> "bold</span>, <span style=\"font-size: big;\">large</span>, "
> "<span style=\"font-size: small;\">small</span> and "
> "<span style=\"color: #FFFF00;background-color: #C11B17;\">"
> "colored</span> text",
> };
>
> So, you have your first formatting at start position 0x19, with
> format code 0x20, and color not set (0x00). Since previously
> you had no formatting from the beginning to byte 0x19, and this
> formatting specifies an alignment value of 0, if we interpret
> this the way you suggest we will now insert a <div > tag with
> left alignment specified at character 0x19, which would cause
> a break in the text. So, we can chose to interpret left
> alignment as really meaning left alignment, which would be
> correct according to the spec, but if this test case is truly
> representative of what SIMs might send us, then we are going to
> have some weird looking strings resulting.
>
> How would you suggest handling this?
The above test is pretty arbitrary, so I wouldn't worry too much about
it. I think that the explicit left alignment is better and is in line
with tests from 102.384.
However, maybe generating some additional SMS messages with EMS text
attributes for testing might be a good idea. See if anyone has an old
Sony Ericsson mobile around?
Regards,
-Denis
next prev parent reply other threads:[~2010-07-09 22:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-02 13:45 [PATCH 0/9] html text attribute patches Kristen Carlson Accardi
2010-07-02 13:46 ` [PATCH 1/9] stkutil: display text attributes as html Kristen Carlson Accardi
2010-07-08 22:49 ` Denis Kenzior
2010-07-09 21:58 ` Kristen Carlson Accardi
2010-07-09 22:13 ` Denis Kenzior [this message]
2010-07-09 22:26 ` Kristen Carlson Accardi
2010-07-13 15:00 ` Denis Kenzior
2010-07-15 20:17 ` andrzej zaborowski
2010-07-15 20:32 ` Denis Kenzior
2010-07-02 13:46 ` [PATCH 2/9] test-stkutil: add unit test for html text attributes Kristen Carlson Accardi
2010-07-02 13:46 ` [PATCH 3/9] test-stkutil: add html attribute test for Display Text tests Kristen Carlson Accardi
2010-07-02 13:46 ` [PATCH 4/9] test-stkutil: add html attribute tests for get_inkey_test Kristen Carlson Accardi
2010-07-02 13:46 ` [PATCH 5/9] test-stkutil: add html attribute tests for get_input_test Kristen Carlson Accardi
2010-07-02 13:46 ` [PATCH 6/9] test-stkutil: add html attribute tests for play_tone_test Kristen Carlson Accardi
2010-07-02 13:46 ` [PATCH 7/9] test-stkutil: add html attribute test for setup_menu_test Kristen Carlson Accardi
2010-07-02 13:46 ` [PATCH 8/9] test-stkutil: add html attribute test for select_item_test Kristen Carlson Accardi
2010-07-02 13:46 ` [PATCH 9/9] test-stkutil: add html attribute tests for setup idle mode tests Kristen Carlson Accardi
-- strict thread matches above, loose matches on Subject: below --
2010-07-13 12:40 [PATCH 0/9] html text attribute patches Kristen Carlson Accardi
2010-07-13 12:40 ` [PATCH 1/9] stkutil: display text attributes as html Kristen Carlson Accardi
2010-07-13 20:38 ` Denis Kenzior
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=4C379F25.9090302@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.