views:

57

answers:

1

Hello community,

i have the following problem sometimes my openURL-Dialog works perfectly, then i looked at the variable from the url and that is the variable:

www.brehm-gmbh.de

but some other times there are some crazy elements at the end of the variable like this:

www.adamczyk-fenster.de%E2%80%8E

i get this pages from an .asc file and both are in this file normal without this elements, what can i do to solve this problem?

thank you all for helping beforehand

A: 

From Wikipedia:

The left-to-right mark (LRM) is a control character or non-printing character, used in the computerized typesetting of bi-directional text, containing mixed left-to-right scripts (such as English and Russian) and right-to-left scripts (such as Arabic and Hebrew). It is used to change the way adjacent characters are grouped with respect to text direction.

You're getting this because (1) you've got non-English URLs, are composing URLs from non-English strings or you have some other non-English elements and the string encoding is attempting to compensate or (2) it's garbarge being interpreted as an encoding (unlikely if it is consistant.)

Call -[NSString localizedNameOfStringEncoding] on the string before you use it see what encoding it is using. You probably need to explicitly establish an encoding when you read in the strings before you put them in the NSURL.

TechZen
ok i have solved the problem, i copied a working page to the not-working page and changed the text between www. and .de and it works, thank you for helping me
Marco