Non-english symbols in Windows username

Problems building or running the engine, queries about how to use features etc.
Post Reply
Ixuss_MyGUI
Gnoblar
Posts: 6
Joined: Mon Jan 25, 2016 8:39 am

Non-english symbols in Windows username

Post by Ixuss_MyGUI »

My windows account name is "Алекс" and path to my documents contents this string. The problem is Ogre can't work with such paths.
The simplest example - I can't run the samples. My program also does not run under this account. Root constructor can't undestand my paths. But if I login as "Alex" it works fine!
As far as I know this is old Ogre problem. How can I make Ogre works with paths with Russian, French, German and other symbols?
NotCamelCase
Greenskin
Posts: 140
Joined: Sun Feb 03, 2013 6:32 pm
x 8

Re: Non-english symbols in Windows username

Post by NotCamelCase »

Seems like a locale settings issue. Did you try calling below in the beginning of program?

Code: Select all

setlocale("LC_ALL", "C")
See this and this.
Check out my projects: https://github.com/NotCamelCase
Ixuss_MyGUI
Gnoblar
Posts: 6
Joined: Mon Jan 25, 2016 8:39 am

Re: Non-english symbols in Windows username

Post by Ixuss_MyGUI »

Yes, of course. But this is not good solution.
For example, if I create new account with some non-english and non-russian (my default locale is russian) symbols this problem is here again! I understand this happens very rarely, but it is.
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Non-english symbols in Windows username

Post by Transporter »

You could rebuild Ogre and replace std::string by std::wstring. It is a common (known) problem, that Ogre doesn't have support for unicode inside. Maybe it is a good time to add a "feature request" for unicode paths.
User avatar
Zonder
Ogre Magi
Posts: 1168
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 73

Re: Non-english symbols in Windows username

Post by Zonder »

Transporter wrote:You could rebuild Ogre and replace std::string by std::wstring. It is a common (known) problem, that Ogre doesn't have support for unicode inside. Maybe it is a good time to add a "feature request" for unicode paths.
Yes, maybe is should be addressed for v2.x
There are 10 types of people in the world: Those who understand binary, and those who don't...
Ixuss_MyGUI
Gnoblar
Posts: 6
Joined: Mon Jan 25, 2016 8:39 am

Re: Non-english symbols in Windows username

Post by Ixuss_MyGUI »

Transporter wrote:You could rebuild Ogre and replace std::string by std::wstring.

Can you tell me a little more?
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Non-english symbols in Windows username

Post by Transporter »

Ixuss_MyGUI wrote:Can you tell me a little more?
See: http://stackoverflow.com/a/402918
Ixuss_MyGUI
Gnoblar
Posts: 6
Joined: Mon Jan 25, 2016 8:39 am

Re: Non-english symbols in Windows username

Post by Ixuss_MyGUI »

I mean how can I rebuild Ogre with replacing std::string by std::wstring?
Ixuss_MyGUI
Gnoblar
Posts: 6
Joined: Mon Jan 25, 2016 8:39 am

Re: Non-english symbols in Windows username

Post by Ixuss_MyGUI »

Anybody made it already?
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Non-english symbols in Windows username

Post by Transporter »

Ixuss_MyGUI wrote:Anybody made it already?
Not yet.
Ixuss_MyGUI
Gnoblar
Posts: 6
Joined: Mon Jan 25, 2016 8:39 am

Re: Non-english symbols in Windows username

Post by Ixuss_MyGUI »

:roll:
Post Reply