Weird Symbol PHP – instead of - - symbols

Hey, well I'm having a problem and this weird symbol is showing up
–
it's suppose to be a " - " but for some reason it's not doing that,anyone got any ideas why.

Sounds like an encoding problem. You might be reading some Unicode text, but it's being interpreted as ASCII instead.

Related

Getting yen symbol when I try to type backslash in pycharm

Note: I have been redirected to this website, as it believed to be the appropriate option for questions like this. If this is not the correct website, could someone please just let me know where I can find help?
I'm trying to write my program in Pycharm, but for some annoying reason whenever I try to type \, it shows up as ¥.
Here's a screenshot:
this is actually supposed to say print('\n'). Whatever has happened has changed all the \ to ¥ in all my files!
And, yes, I have tried copying and pasting the \ but it just ends up changing into ¥
So, could someone please let me know how to fix this??
This could be happening because you are using a font, particularly a Japanese don't. Change the font to an English font like Arial.
If that doesn't work you can use the Unicode backslash in Unicode and ASCII it is encoded at U+005C

\u0092 is not printed in UILabel

I have a local json file with some descriptions of an app and I have found a weird behaviour when parsing \u0092 and \u0091 characters.
When json file contains these characters, the corresponding parsed NSString is printed like "?" and in UIlabel it dissapears completely.
Example "L\u2019H\u00e9r." is showed as "LHér." instead of "L'Hér."
If I replace this characters with \u2019, then I can see the caracter ' in UILabel
Does anybody any clue about this?
EDIT: For the moment I will substitute both of them with character \u2019, it is also a ' and there is no problem confusing it with a control character. Thank you all!
This answer is a little speculative, but I hope it gets you on the right tracks.
Your best bet may be to give up and substitute \u0091 and \u0092 for something else as a preprocessing step before string display. These are control characters and are unprintable in most encodings. But:
If rest of the file is proper UTF, your json file probably has problems: encoding is wrong (CP-1250?) while you read the file as UTF, some error has been made when converting the file, or a similar issue. So another solution is of course fixing your file.
If you're not sure about how your file is encoded, it may simply be encoded in CP-1250 - so reading the file using NSWindowsCP1250StringEncoding might fix your problem.
BTW, if you hardcode a string #"\u0091", you'll get a compilation time error Universal character name refers to a control character. Yes, not even a warning, it's that much unprintable in Unicode ;)

How to convert Casa_Batll%C3%B3 to Casa_Batllȯ(Latin letters)in ios

I would like to convert convert Casa_Batll%C3%B3 to Casa_Batllȯ.
NSLog(#"Converting String:%#",[#"Casa_Batll%C3%B3" stringByReplacingOccurrencesOfString:#"%c3%b3" withString:#"ȯ"]);
Using this code, i get only known latin characters or some special characters but not unknown latin characters or special characters. Actually i am getting the string from database which is already created so i don't know about those strings in this database. I have also tried using NSString+HTML.m in this MWFeedParser. But i didn't get anything. I have also seen these link1 and link2. Please help anyone to me.
Use stringByReplacingPercentEscapesUsingEncoding:.
NSLog(#"Converting String:%#",[#"Casa_Batll%C3%B3" stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]);
Adjust the encoding as appropriate.

How to fix encoding issues ? (NSString / XMLParsing)

I parsed an XML file containing UTF8/latin characters (é, â, è, î, etc...).
At first I tried to fix this with a function replacing the wrong chars. But I'm having a problem with à, replaced by ".
And as I don't want to replace all the " of my file, I have to find another way to fix it.
Any idea to fix this ?
Thanks a lot for your advices
To finally answer this question, it worked using TBXML. But only with UTF-8 encoding, not ISO-8859-1.

Multibyte characters in URL are not rendering

I have a bugging problem. For a website I made there are search engine friendly URL's generated. The only problem is there are ß-chars in the url too. Chars like ö, ï, ä, ü etc. are placed correct. But with the ß-char there is a diamond-icon with a questionmark in it. -> �
I thought it had to do with the charset which is used but i've tried both UTF-8 and iso-8859-1. Both without luck.
I need to have the correct character in the url for the readability of deeplinks.
does the character U+00DF in UTF8 work with you?
i tried to use it on Firefox and the URL was translated into ss
in URL encoding, the U+00DF should be translated to %DF
Thanks for your answers, both + 1. I've solved the problem by using the iconv function, which is installed by default.

Resources