When trying to open query window to someone who has nick with russian
characters, window opens with title Dialog with (null) @server
and messages are going to nowhere
you have to open query window manualy by typing /query nick
- (void) use_global_toggled:(id) sender
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
ServerList.nib and ./ServerList.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
TabMenu.nib and ./TabMenu.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
UrlGrabber.nib and ./UrlGrabber.nib
Only in .: X-Chat_Aqua.0.15.2.dmg
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/alert.
nib and ./alert.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
aquachat.xcodeproj and ./aquachat.xcodeproj
Only in .: build
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: NO
Use this patch. It work fine for me.
Only in .: .DS_Store
Only in .: .patch
diff -u ../../../cvs/xchat/src/fe-aqua/AquaChat.mm ./
AquaChat.mm
--- ../../../cvs/xchat/src/fe-aqua/AquaChat.mm 2006-01-12
07:17:06.000000000 +0300
+++ ./AquaChat.mm 2006-04-02 21:49:14.000000000 +0400
@@ -581,8 +581,8 @@
[sub addItemWithTitle:[NSString stringWithFormat:@"
Country: %s",
user->hostname ? country(user->
hostname) : "Unknown"]
action:NULL keyEquivalent:@""];
- [sub addItemWithTitle:[NSString stringWithFormat:@"
Realname: %s",
- user->realname ? user->
realname : "Unknown"]
+ [sub addItemWithTitle:[NSString stringWithFormat:@"
Realname: %@",
+ user->realname ? [NSString
stringWithUTF8String:user->realname] : @"Unknown"]
action:NULL keyEquivalent:@""];
[sub addItemWithTitle:[NSString stringWithFormat:@"
Server: %s",
user->servername ? user->
servername : "Unknown"]
@@ -592,7 +592,8 @@
action:NULL keyEquivalent:@""];
}
- [self buildMenu:menu fromList:popup_list nick:nick];
+ //TODO more beautiful UTF-8 encoding
+ [self buildMenu:menu fromList:popup_list nick:
[NSString stringWithCString:[nick UTF8String]]];
return menu;
}
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
BanList.nib and ./BanList.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/CVS
and ./CVS
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
ChanList.nib and ./ChanList.nib
diff -u ../../../cvs/xchat/src/fe-aqua/ChatWindow.mm ./
ChatWindow.mm
--- ../../../cvs/xchat/src/fe-aqua/ChatWindow.mm 2006
-01-15 18:10:16.000000000 +0300
+++ ./ChatWindow.mm 2006-04-02 23:04:42.000000000 +0400
@@ -1110,7 +1110,7 @@
- (void) set_nick
{
- [nick_text setStringValue:[NSString stringWithCString:
sess->server->nick]];
+ [nick_text setStringValue:[NSString stringWithUTF8
String:sess->server->nick]];
[nick_text sizeToFit];
}
@@ -1745,7 +1745,7 @@
int this_len = strlen (sess->channel);
if (len > this_len || rfc_ncasecmp ((char
*) start, sess->channel, len) != 0)
return NULL;
- [match_list addObject:[NSString
stringWithCString:sess->channel]];
+ [match_list addObject:[NSString
stringWithUTF8String:sess->channel]];
}
else
{
@@ -1755,7 +1755,7 @@
struct User *user = u->user;
int this_len = strlen (user->nick);
if (len <= this_len && rfc_ncasecmp
((char *) start, user->nick, len) == 0)
- [match_list addObject:
[NSString stringWithCString:user->nick]];
+ [match_list addObject:
[NSString stringWithUTF8String:user->nick]];
}
}
@@ -1776,7 +1776,7 @@
{
int this_len = strlen (tmp_sess->channel);
if (len <= this_len && strncasecmp (start, tmp_
sess->channel, len) == 0)
- [match_list addObject:[NSString
stringWithCString:tmp_sess->channel]];
+ [match_list addObject:[NSString
stringWithUTF8String:tmp_sess->channel]];
}
}
@@ -1826,7 +1826,7 @@
// pointing to the 'c' and not the tailing NULL.
NSTextStorage *stg = [view textStorage];
- const char *s = [[stg string] cString];
+ const char *s = [[stg string] UTF8String];
const char *start = s + range.location - 1;
const char *stop = start;
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
DccChat.nib and ./DccChat.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
DccRecv.nib and ./DccRecv.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
DccSend.nib and ./DccSend.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
EditEvents.nib and ./EditEvents.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
EditList.nib and ./EditList.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
English.lproj and ./English.lproj
Only in .: Growl.framework
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
IgnoreList.nib and ./IgnoreList.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
LogWindow.nib and ./LogWindow.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
NotifyList.nib and ./NotifyList.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
Palette and ./Palette
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
PluginList.nib and ./PluginList.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/Prefs.
nib and ./Prefs.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
RawLog.nib and ./RawLog.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
SGRequest.nib and ./SGRequest.nib
diff -u ../../../cvs/xchat/src/fe-aqua/ServerList.mm ./
ServerList.mm
--- ../../../cvs/xchat/src/fe-aqua/ServerList.mm 2006
-01-24 05:47:42.000000000 +0300
+++ ./ServerList.mm 2006-04-02 23:37:35.000000000 +0400
@@ -41,6 +41,7 @@
@"SJIS (Japanese)",
@"CP949 (Korean)",
@"CP1251 (Cyrillic)",
+ @"KOI8-R (Cyrillic)",
@"CP1256 (Arabic)",
@"GB18030 (Chinese)",
@"BIG-5 (Chinese)",
@@ -290,7 +291,7 @@
static void set_text_value (NSTextField *sender, char **f)
{
free (*f);
- const char *v = [[sender stringValue] cString];
+ const char *v = [[sender stringValue] UTF8String];
*f = v[0] ? strdup (v) : NULL;
}
@@ -370,7 +371,7 @@
{
if (str == NULL)
str = "";
- return [NSMutableString stringWithCString:str];
+ return [NSMutableString stringWithUTF8String:str];
}
- (void) use_global_toggled:(id) sender
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
ServerList.nib and ./ServerList.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
TabMenu.nib and ./TabMenu.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
UrlGrabber.nib and ./UrlGrabber.nib
Only in .: X-Chat_Aqua.0.15.2.dmg
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/alert.
nib and ./alert.nib
Common subdirectories: ../../../cvs/xchat/src/fe-aqua/
aquachat.xcodeproj and ./aquachat.xcodeproj
Only in .: build
Logged In: NO
Oic%))
http://libc.net.ru/utf8.patch it's better -)
to patch use
patch < utf8.patch
from lates cvs