[Pidgin] #3149: Friendly name with RTL characters do not display properly
Pidgin
trac at pidgin.im
Fri Sep 21 01:09:32 EDT 2007
#3149: Friendly name with RTL characters do not display properly
---------------------------+------------------------------------------------
Reporter: xkjyeah | Owner:
Type: defect | Status: new
Priority: minor | Milestone:
Component: pidgin (gtk) | Version: 2.0.0
Resolution: | Keywords:
Pending: 0 |
---------------------------+------------------------------------------------
Comment (by xkjyeah):
it's an LRM character missing. i'm not going to install MTN just to insert
ONE (insert word here) LRM character and submit a patch. "\xe2\x80\x8e".
Or is it just that the text below is wrong?
DEMO:
(without LRM)
IPhO'07 ايران-اصفهان: 1. if u use pidgin, there might be some display
problems
IPhO'07 ايران-اصفهان: i have noticed
(with LRM)
IPhO'07 ايران-اصفهان: 1. if u use pidgin, there might be some display
problems
IPhO'07 ايران-اصفهان: i have noticed
HEXDUMP: (version with error)
00000000 28 31 32 3a 33 38 3a 33 35 20 50 4d 29 20 28 3d |(12:38:35 PM)
(=|
00000010 44 29 20 d8 b3 d9 8a d9 85 20 d8 b4 d8 a7 d9 88 |D) ......
......|
00000020 20 da 86 d9 89 20 d8 af d8 a7 d9 86 d9 8a d8 a7 | ....
..........|
00000030 d9 84 20 3b 20 49 50 68 4f 27 30 37 20 d8 a7 d9 |.. ; IPhO'07
...|
00000040 8a d8 b1 d8 a7 d9 86 2d d8 a7 d8 b5 d9 81 d9 87
|.......-........|
00000050 d8 a7 d9 86 3a 20 31 2e 20 69 66 20 75 20 75 73 |....: 1. if u
us|
00000060 65 20 70 69 64 67 69 6e 2c 20 74 68 65 72 65 20 |e pidgin,
there |
00000070 6d 69 67 68 74 20 62 65 20 73 6f 6d 65 20 64 69 |might be some
di|
Clearly, the direction markers are '''missing'''.
From the code, theeither the Ubuntu build (from ubuntu.pl) was built
'''without PANGO_1_4''', or something else caused the direction markers
defined in ''str_embed_direction_chars'' to disappear (cf: pidgin-
gtkconv.c). But er, Pango 1.4 was 3 years ago. Delete the #ifdef?
I'm sorry if i'm violating some trac policy on code in comments, but this
is a trivial issue! Look here! The mistake is either here, or
str_embed_direction_chars
{{{
char *new_message = g_memdup(displaying, length);
char *alias_escaped = (alias ? g_markup_escape_text(alias,
strlen(alias)) : g_strdup(""));
/* The initial offset is to deal with
* escaped entities making the string longer */
int tag_start_offset = alias ? (strlen(alias_escaped) -
strlen(alias)) : 0;
int tag_end_offset = 0;
/* Enforce direction on alias */
if (is_rtl_message)
str_embed_direction_chars(&alias_escaped);
if (flags & PURPLE_MESSAGE_WHISPER) {
str = g_malloc(1024);
/* If we're whispering, it's not an autoresponse.
*/
if (purple_message_meify(new_message, -1 )) {
g_snprintf(str, 1024, "***%s",
alias_escaped);
strcpy(color, "#6C2585");
tag_start_offset += 3;
}
else {
g_snprintf(str, 1024, "*%s*:",
alias_escaped);
tag_start_offset += 1;
tag_end_offset = 2;
strcpy(color, "#00FF00");
}
}
}}}
--
Ticket URL: <http://developer.pidgin.im/ticket/3149#comment:1>
Pidgin <http://pidgin.im>
Pidgin
More information about the Tracker
mailing list