Conquer Club

special characters in map XML?

Topics that are not maps. Discuss general map making concepts, techniques, contests, etc, here.

Moderator: Cartographers

Forum rules
Please read the Community Guidelines before posting.

special characters in map XML?

Postby sherkaner on Thu Jul 09, 2009 4:48 am

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?
Colonel sherkaner
 
Posts: 1595
Joined: Thu May 03, 2007 3:21 am
Location: Zwolle

Re: special characters in map XML?

Postby Premier2k on Thu Jul 09, 2009 7:22 am

User avatar
Cadet Premier2k
 
Posts: 492
Joined: Tue Oct 02, 2007 5:53 am

Re: special characters in map XML?

Postby yeti_c on Thu Jul 09, 2009 8:28 am

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.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am

Re: special characters in map XML?

Postby sherkaner on Thu Jul 09, 2009 9:38 am

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.
Colonel sherkaner
 
Posts: 1595
Joined: Thu May 03, 2007 3:21 am
Location: Zwolle

Re: special characters in map XML?

Postby yeti_c on Fri Jul 10, 2009 3:03 am

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.
Image
Highest score : 2297
User avatar
Lieutenant yeti_c
 
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am


Return to Foundry Discussions

Who is online

Users browsing this forum: No registered users