Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Can't Ultimate++ use Japanese?
Can't Ultimate++ use Japanese? [message #46092] Thu, 03 March 2016 21:01 Go to next message
kurete is currently offline  kurete
Messages: 17
Registered: March 2016
Location: Japan
Promising Member

Hello.

I want to use japanese.

However, When I tried the following sample cord, I brought about an error.


#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN {
	PromptOK("あいうえお");
}




error

main.cpp (6): error C2001: 定数が 2 行目に続いています。
error C2059: 構文エラー: '}'

Can't Ultimate++ use Japanese?

If it's impossible, I'd like to make sure that you can participate in Ultimate++'s developments and use Japanese.
Re: Can't Ultimate++ use Japanese? [message #46094 is a reply to message #46092] Fri, 04 March 2016 09:11 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello kurete

Welcome to the Forum Smile.

It seems you compile in Windows with Visual Studio.
I have tried your example in my computer with european keyboard and I do not get compiling errors:

index.php?t=getfile&id=4955&private=0

This error message indicates that in your computer, Visual Studio thinks that there is a newline in the string.

Does anybody know the reason of this error?
  • Attachment: screen.png
    (Size: 3.29KB, Downloaded 497 times)


Best regards
Iñaki
Re: Can't Ultimate++ use Japanese? [message #46097 is a reply to message #46092] Sat, 05 March 2016 00:55 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
Does the MSCC want utf-8, or some weird microsoft encoding?
I would start there, try to setup theIde to different common japan encodings (vs utf-8 of course), and try it.

Also you may want to try some GCC/CLANG compiler with utf-8, that should work of course, same as under linux.
Re: Can't Ultimate++ use Japanese? [message #46106 is a reply to message #46092] Tue, 08 March 2016 10:59 Go to previous messageGo to next message
kurete is currently offline  kurete
Messages: 17
Registered: March 2016
Location: Japan
Promising Member

I change the encode to UTF-8 BOM from UTF-8 in TheIDE.

Then Build became possible. However, the character isn't indicated.

Also, TheIDE stop movement when I input Japanese in this state.

TheIDE normally works when inputting Japanese using a copy and paste.

I'm using MSC15 for a Build method

What is this?
Re: Can't Ultimate++ use Japanese? [message #46129 is a reply to message #46106] Mon, 14 March 2016 13:03 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
I don't know Japanese,

I used google translate. But created small example.
So Japanese text may not be accurate.

It is working on my PC

Windows 10 English. MSVC 2015.
All default settings.



Warm Regards

Deepak

[Updated on: Mon, 14 March 2016 13:04]

Report message to a moderator

Re: Can't Ultimate++ use Japanese? [message #46130 is a reply to message #46129] Mon, 14 March 2016 13:12 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Modified example with your PromptOK.
It is compiling and working fine.


Warm Regards

Deepak

[Updated on: Mon, 14 March 2016 13:12]

Report message to a moderator

Re: Can't Ultimate++ use Japanese? [message #46133 is a reply to message #46092] Tue, 15 March 2016 23:39 Go to previous messageGo to next message
kurete is currently offline  kurete
Messages: 17
Registered: March 2016
Location: Japan
Promising Member

I'm sorry to be late.

I changed the compiler to MinGW from MSVC 2015 and then that went well.

Also, I was able to use the source code of Mr.deep.

However, I don't know that TheIDE stop movement when the encode is changed and I input Japanese in this state.

Perhaps the cause is my environment. I use Japanese Windows7 32bit.
Re: Can't Ultimate++ use Japanese? [message #46135 is a reply to message #46092] Wed, 16 March 2016 10:58 Go to previous message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
"TheIDE stop movement" =

1) TheIDE completely stops working (even when you switch back to EN)

OR

2) TheIDE works, but compilation starts failing? (so the edit did change file encoding to something what compiler does not understand).


What is your setting in: TheIDE -> Setup -> Environment -> tab:Editor -> "Default charset"?
(UTF8 should work well with MinGW, does it?)


If the things stop working after entering any japan character, I think there may be another workaround. Create your application with english strings and wrap them immediately for localization, see:
http://www.ultimatepp.org/srcdoc$Core$i18n$en-us.html

But you will probably run into some weird problem there too, if it's already behaving weird with ordinary .cpp files.
So we rather should figure out, what is the problem. Smile
Previous Topic: "\n" does not work on DrawText
Next Topic: Ridiculous behavior of the hotkeys Ctrl+Alt+right and Ctrl+Alt+left in the Stacking mode
Goto Forum:
  


Current Time: Fri Mar 29 08:06:19 CET 2024

Total time taken to generate the page: 0.01511 seconds