Non-breaking space in guild name

Forum closed. All further discussion to be discussed at https://github.com/OpenKore/

Moderators: Moderators, Developers

Message
Author
rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

Non-breaking space in guild name

#1 Post 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...
Sorry, my english is very bad !

EternalHarvest
Developers
Developers
Posts: 1800
Joined: 05 Dec 2008, 05:42
Noob?: Yes

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

#2 Post 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?

rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

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

#3 Post 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 :(
Sorry, my english is very bad !

EternalHarvest
Developers
Developers
Posts: 1800
Joined: 05 Dec 2008, 05:42
Noob?: Yes

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

#4 Post 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);
 	}

kLabMouse
Administrator
Administrator
Posts: 1301
Joined: 24 Apr 2008, 12:02

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

#5 Post 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?

rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

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

#6 Post 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..
Sorry, my english is very bad !

EternalHarvest
Developers
Developers
Posts: 1800
Joined: 05 Dec 2008, 05:42
Noob?: Yes

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

#7 Post 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?

rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

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

#8 Post 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
Sorry, my english is very bad !

EternalHarvest
Developers
Developers
Posts: 1800
Joined: 05 Dec 2008, 05:42
Noob?: Yes

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

#9 Post by EternalHarvest »

So, did that patch fix the issue for you?

rocknroll
Been there done that!
Been there done that!
Posts: 118
Joined: 19 Sep 2011, 07:30
Noob?: Yes

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

#10 Post 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. :(
Sorry, my english is very bad !

Locked