Opened 12 years ago

Last modified 10 years ago

#3149 new defect

Friendly name with RTL characters do not display properly

Reported by: xkjyeah Owned by: elb
Milestone: Component: pidgin (gtk)
Version: 2.0.0 Keywords:
Cc:

Description

See attachment. An RTL/LTR marker missing somehwhere?

I typed "9. ...." at the problematic line.

Attachments (1)

RTL LTR gaim.png (40.1 KB) - added by xkjyeah 12 years ago.

Download all attachments as: .zip

Change History (6)

Changed 12 years ago by xkjyeah

comment:1 Changed 12 years ago 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");
			}
		}

comment:2 Changed 12 years ago by xkjyeah

argh. here's the hexdump again. (note, in the demo portion above, i deleted some parts. but it doesn't change the issue. the LRE/LRM/RLM/RLE is missing!)

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|

comment:3 in reply to: ↑ description Changed 12 years ago by xkjyeah

I believe this part is insufficient.

		/* Enforce direction on alias */
		if (is_rtl_message)
			str_embed_direction_chars(&alias_escaped);

In my case, the message was LTR, while the alias was RTL.

comment:4 Changed 10 years ago by bernmeister

Is this still occurring in Pidgin 2.5.8?

comment:5 Changed 10 years ago by darkrain42

  • Owner set to elb
Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!