Page 1 of 2

Non-breaking space in guild name

Posted: 14 Jul 2012, 10:32
by rocknroll
Why Openkore can't detect Guild name until now? (well i use new openkore r8049) .
Is there any solution for this issue? or because console (dos) can't read a non-breaking space (0160)?? i have try on wxstart too but it same.

i have try to manipulate function on src to trim whitespace in perl command, like

Code: Select all

s/^\s+// and s/\s+$//
so when openkore read (eg. • Dragon •) in config, it will be manipulate before sending a packet to server (which a string of guild name has change).

any idea for this?? sory for my bad english...

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 15 Jul 2012, 11:01
by EternalHarvest
rocknroll wrote:so when openkore read (eg. • Dragon •) in config, it will be manipulate before sending a packet to server (which a string of guild name has change).
Why do you need to send it to server? Which guild name "can't be detected"? Your own, other players? How it "can't be detected"? There's empty name, or malformed name, or what?

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 17 Jul 2012, 09:43
by rocknroll
EternalHarvest wrote:
rocknroll wrote:so when openkore read (eg. • Dragon •) in config, it will be manipulate before sending a packet to server (which a string of guild name has change).
Why do you need to send it to server? Which guild name "can't be detected"? Your own, other players? How it "can't be detected"? There's empty name, or malformed name, or what?
my own and others too, because my server is enabling of use ascii on guild or party name. so openkore can't detect.
example : "R e b o r n" << that using non-breaking space (alt+0610) not normally space.

if i write in config.txt, openkore can't buff that player

Code: Select all

partySkill Blessing {
lvl 10
sp > 10%
target_isGuild R e b o r n
target_whenStatusInactive Blessing
notPartyOnly 1
i just try to filter the guild name before openkore send data to server so config.txt can be simply of buffing on guild name with ascii non-breaking space name.

so i got an idea to filter guild name on misc.pm, like this

Code: Select all

if ($config{$prefix."_isGuild"}) {
		my $xchange = $player->{guild}{name};
		$xchange =~ s/^\s+//;
		$xchange =~ s/\s+$//;
		$xchange =~ s/\s+/ /g;
		return 0 unless ($player->{guild} && existsInList($config{$prefix . "_isGuild"}, $xchange));
}
well, i just filter it to trim the white-blank space on guild name which openkore can't detect it.
any idea for this??
*sory my bad english :(

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 17 Jul 2012, 18:50
by EternalHarvest
The following fixes that problem for me:

Code: Select all

Index: Utils/DataStructures.pm
===================================================================
--- Utils/DataStructures.pm	(revision 8060)
+++ Utils/DataStructures.pm	(working copy)
@@ -226,7 +226,8 @@
 	foreach (@array) {
 		s/^\s+//;
 		s/\s+$//;
-		s/\s+/ /g;
+		# breaks non-space-symbol whitespace
+		#s/\s+/ /g;
 		next if ($_ eq "");
 		return 1 if (lc($_) eq $val);
 	}

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 17 Jul 2012, 20:05
by kLabMouse
EternalHarvest wrote:The following fixes that problem for me:
I wonder why such whitespace reduction is there in the first place...
May-be Because someone planned to have a multi param strings?

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 18 Jul 2012, 01:36
by rocknroll
EternalHarvest wrote: I wonder why such whitespace reduction is there in the first place...
hmm... well if i run with start.exe (console windows) openkore can't read the symbol of • (dot) or non-breaking space, like "• R e b o r n •". on the screen it looks like " R e b o r n ".
if i run with wxstart.exe, the openkore read the symbol of • (dot) but not to non-breaking space (alt+0160).
i think whitespace reduction in the frist place is to remove that • (dot), haha..

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 18 Jul 2012, 03:06
by EternalHarvest
But it only reduces it in values from config here, not from the game. Inability to display that symbol is windows-specific bug I think, and it's not whitespace?
May-be Because someone planned to have a multi param strings?
In existsInList?

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 18 Jul 2012, 09:31
by rocknroll
EternalHarvest wrote:But it only reduces it in values from config here, not from the game. Inability to display that symbol is windows-specific bug I think, and it's not whitespace?
well i guess the non-breaking space (alt+0160) similar like whitespace :D

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 18 Jul 2012, 10:19
by EternalHarvest
So, did that patch fix the issue for you?

Re: [ASK]Openkore can't detect Guild with non-breaking space

Posted: 19 Jul 2012, 09:23
by rocknroll
no, i use openkore r8074 and it same like before. but working on symbol • (dot alt+7). i think the function of string can't read the non-breaking space (alt+0160) in config, and why that problem running in macros?

hmm with variabel in macros it's look like

Code: Select all

$guildname = • R e b o r n •
the plugin can read that variable. but my problem is like put on config so i don't need to write many line in macros to buff a guild with 'non-breaking space' name, because in macros we have to write what should be the trigger of that. actually in config just put on target_isGuild and norPartyOnly to trigger that. :(