git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 6/9] pretty: two phase conversion for non utf-8 commits

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Sep 24, 2012, 01:21 UTC
Message-ID
<CACsJy8DoBwLccaGGFqDfW2F3isZ74S2FLGXW3bDOcr2X-hQc3w@mail.gmail.com>
In-Reply-To
<189332269.134567.1348408475044.JavaMail.root@dewire.com>

On Sun, Sep 23, 2012 at 8:54 PM, Robin Rosenberg <robin.rosenberg@dewire.com> wrote:

>> This of course only works with encodings that are compatible with
>> Unicode.
> Such as? Unicode was defined to encompass all knows encodings.

Just a precaution because I have never read Unicode standard (and it keeps getting updated, hence "incomplete")

Show 12 quoted lines
>
>> -static size_t format_commit_one(struct strbuf *sb, const char
>> *placeholder,
>> +static size_t format_commit_one(struct strbuf *sb, /* in UTF-8 */
>> +                             const char *placeholder,
>>                               void *context)
>>  {
>>       struct format_commit_context *c = context;
>
> Which parameter does the comment apply to? I believe most conventions
> nowadays include parameter documentation in the comment preceding
> the function header.
Yeah. I should have followed that.
Show 14 quoted lines
>> b/t/t6006/commit-msg.iso8859-1
>> new file mode 100644
>> index 0000000..f8fe808
>> --- /dev/null
>> +++ b/t/t6006/commit-msg.iso8859-1
>> @@ -0,0 +1,5 @@
>> +Test printing of complex bodies
>> +
>> +This commit message is much longer than the others,
>> +and it will be encoded in iso8859-1. We should therefore
>> +include an iso8859 character: �bueno!
>
> "8859-1" to be exact. Only three 8859 encoding has the
> character.

Yep. But i'll probably need a closer look at t6006. It seems there's a few "upside down exclamation" (not sure what it's called) in UTF-8 in that test. I'll fix the text too.

-- 
Duy
Previous: Robin RosenbergNext: Nguyễn Thái Ngọc Duy
Message 17 of 21 in “Advanced --oneline layout”
  1. 0/6 Advanced --oneline layoutNguyễn Thái Ngọc Duy, Sep 22, 2012
  2. 1/6 pretty: share code between format_decoration and show_decorationsNguyễn Thái Ngọc Duy, Sep 22, 2012
  3. 2/6 pretty: split parsing %C into a separate functionNguyễn Thái Ngọc Duy, Sep 22, 2012
  4. 3/6 pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s)Nguyễn Thái Ngọc Duy, Sep 22, 2012
  5. 4/6 utf8.c: move display_mode_esc_sequence_len() for use by other functionsNguyễn Thái Ngọc Duy, Sep 22, 2012
  6. 5/6 utf8.c: add utf8_strnwidth() with the ability to skip ansi sequencesNguyễn Thái Ngọc Duy, Sep 22, 2012
  7. 6/6 pretty: support padding placeholders, %< %> and %<>Nguyễn Thái Ngọc Duy, Sep 22, 2012
  8. 7/6 pretty: trim trailing spaces due to paddingNguyễn Thái Ngọc Duy, Sep 22, 2012
  9. 0/9 Advanced --oneline layoutNguyễn Thái Ngọc Duy, Sep 23, 2012
  10. 1/9 pretty: share code between format_decoration and show_decorationsNguyễn Thái Ngọc Duy, Sep 23, 2012
  11. 2/9 pretty: split parsing %C into a separate functionNguyễn Thái Ngọc Duy, Sep 23, 2012
  12. 3/9 pretty: support %C(auto[,N]) to turn on coloring on next placeholder(s)Nguyễn Thái Ngọc Duy, Sep 23, 2012
  13. 4/9 utf8.c: move display_mode_esc_sequence_len() for use by other functionsNguyễn Thái Ngọc Duy, Sep 23, 2012
  14. 5/9 utf8.c: add utf8_strnwidth() with the ability to skip ansi sequencesNguyễn Thái Ngọc Duy, Sep 23, 2012
  15. 6/9 pretty: two phase conversion for non utf-8 commitsNguyễn Thái Ngọc Duy, Sep 23, 2012
  16. Robin RosenbergSep 23, 2012
  17. Nguyen Thai Ngoc DuySep 24, 2012
  18. 7/9 pretty: support padding placeholders, %< %> and %><Nguyễn Thái Ngọc Duy, Sep 23, 2012
  19. Jeff KingOct 24, 2012
  20. 8/9 pretty: support truncating in %>, %< and %><Nguyễn Thái Ngọc Duy, Sep 23, 2012
  21. 9/9 pretty: support %>> that steal trailing spacesNguyễn Thái Ngọc Duy, Sep 23, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.