I am writing a c program in CentOS7(using VMware), l have succeed in making my system language Chinese, but But the Chinese in my code still cannot be displayed normally. like this
PS:English is not my native language; please excuse typing errors.
Related
I have a very old program (written in the time of Windows XP in C++, I trust). I need to translate certain dialogues of the program from English to Bulgarian. In principle, this can be done via resource file editing. It works just fine with one serious exception. It is only the first half of Bulgarian phrases that is shown after editing, compiling and saving the resource. I realise it has everything to do with encodings (probably, CP1252 is replaced with UTF-8 somehow).
I tried to use software called Resource hacker as well as MS Visual studio to edit the resource, but the problem persists in both cases. Please give me ideas on how this problem can be solved. I am no programmer in any way, so please don't be too laconic :-).
I have a Japanese program, but when I try to run it all the Japanese characters turn into random symbols like in the link to the picture
http://puu.sh/avcAp/04de126564.png
I've tried searching for answers but I only see ways to fix it if it shows up as blank rectangles and not the random symbols I'm getting.
You can see little bits of english just fine though, like in the link, you can see the .exe ... (I'm trying to install it but there's an error and since it's all these random symbols I have no idea what it means.)
Edit:
I'm running Windows 7 Ultimate. This is a program I downloaded online, but I'm sure it's not broken. The symbols in the picture are a screenshot from an error window (The windows default one with a red X on the left), however all the text that's related to that program that is Japanese is also random symbols, and my picture is just an example.
Edit 2:
Here is a better image
http://puu.sh/aveXV/7d15ecf2d4.png
Where you can see some Japanese characters, but some are random characters. This is when I first run the .exe to install and it's asking for what directory I want to install to
Thanks for your help in advance
It sounds like a non-Unicode program. It's not ideal, but you can change your non-Unicode program language in Region and Language settings in Control Panel to Japanese (requires reboot).
It only affects non-Unicode programs, so most modern English programs will be unaffected. I've changed mine to Chinese (PRC) and the only program I noticed affected was "cmd.exe". It allowed me to type and display Chinese at the console.
when I try to write an Arabic language words in xcode editor it does not display correctly, it's displayed as messed up words and reversed (the output in iPhone is OK), so it becomes harder for me to review the strings I entered in the editor, is there anyway to overcome this issue ?
I think those are bugs in Xcode (you can try changing the font, but I don't think the direction can be changed).
However, it is generally preferable to write your strings in English and then use internationalization (i18n) techniques to convert and display them in Arabic at runtime. A quick google revealed this blogpost. This solves two issues:
You can support any number of languages.
You can store your Arabic text in a separate file and edit it with an external editor, making it easier to work with.
I wrote this question and it turns out the code is correct but it doesnt display properly on my system. I dont understand! why might it do this? My system is set to united states english. I dont know what the problem can be.
This makes it difficult to develop unicode apps when it doesn't display properly on my system :(
-Edit- To be more clear. I made a winform app using .NET and the text appears incorrect on my machine but works on others. I can copy/paste text into my app but i wont know if it ran correctly since i see nonsense instead of text. However most unicode works. Special chars (like >16bits) does not.
I assume from the question you linked to that you are on a windows machine. The problem could be that windows does not have a global encoding option at all. The united states english is a language setting which as far as I know does not mean what you expect it to mean, as in it does not set all of your programs to show text in a unicode format.
The quick answer is that especially in windows, each program that displays text to the user is responsible for the character encoding. You have to make sure that the program and the environment where the problem appears are set to display text using some unicode format, such as UTF-8.
Read up on Unicode and UTF-8
I use OS X and I am currently cooperating with a windows user and deploying the scripts on a linux server. We use git for version control, and I keep getting R scripts from his end where the character encoding used has mixed latin1 and utf8 encodings. So I have a couple of questions.
Is there a simple to use editor for windows that handle UTF8 with more grace than Winedt that my coauthor currently uses? I use emacs, but I am having a hard time selling getting him to switch.
How to set up R in Windows so that it defaults to reading and writing UTF8?
This is driving me crazy. Has anyone found a solution for it (be it in the workflow or in the software used) who cares to share?
Take a look at ?Encoding to set the encoding for specific objects.
You might have luck with options(encoding = ) see ?options, (disclaimer, I don't have a windows machine)
As for editors, I haven't heard complaints about encoding issues with Crimson editor which lists utf-8 support as a feature.
TextPad is a well featured editor supporting R syntax that allows you to specify the target platform for files (Win/UNIX/Mac/keep current encoding) when you save them. The only problem with it is that some of the keyboard shortcuts are nonstandard (e.g. 'Find' is F5, not F3).