Page 1 of 1

special characters in map XML?

PostPosted: Thu Jul 09, 2009 4:48 am
by sherkaner
Question: which special characters can be in territory names?

Why?
I'm using JQuery to find a territory now in BOB, but it disallows some characters, namely these: #;&,.+*~':"!^$[]()=>|/
I'll have to escape some, and I've already escaped :'.&"
But are there any other characters that are/could be used in territory names?

Re: special characters in map XML?

PostPosted: Thu Jul 09, 2009 7:22 am
by Premier2k

Re: special characters in map XML?

PostPosted: Thu Jul 09, 2009 8:28 am
by yeti_c
If you have a finite list of disallowed chars - then escape all of them...

Any accented or similar symbols that are to be displayed have to be done with & encoding. (Which can also include a #)

C.

Re: special characters in map XML?

PostPosted: Thu Jul 09, 2009 9:38 am
by sherkaner
yeti_c wrote:If you have a finite list of disallowed chars - then escape all of them...

Any accented or similar symbols that are to be displayed have to be done with & encoding. (Which can also include a #)

C.

Kinda worried about performance atm for that solution, but that is an option.
I think I should change it in such a way that I never need to use the territory names as id's, or remove those characters beforehand (I do it afterward now). But still thinking about how to do that exactly.

Re: special characters in map XML?

PostPosted: Fri Jul 10, 2009 3:03 am
by yeti_c
sherkaner wrote:
yeti_c wrote:If you have a finite list of disallowed chars - then escape all of them...

Any accented or similar symbols that are to be displayed have to be done with & encoding. (Which can also include a #)

C.

Kinda worried about performance atm for that solution, but that is an option.
I think I should change it in such a way that I never need to use the territory names as id's, or remove those characters beforehand (I do it afterward now). But still thinking about how to do that exactly.


Creating your own ID's would be very simple - and probably the way forward... that way these special chars would only be used for display...

I think the only thing you'd need to look out for is the cards display - as that is the only thing you are not writing out - you would need to do a lookup from that into your arrays.

C.