You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RG2 is missing foeign characters from beginning of competitor names. #287
Quick and dirty fix for me was using setlocale(LC_ALL, 'en_US.UTF-8'); at begginning of rg2api.php but that should be used only in case of UTF-8 for data and RG2 encoding.
In results sixth position correct name is "Ēriks Lebedoks" but problematic
version returns "riks Lebedoks".
On 15th position "Ģirts Pakalns" turns into "irts Pakalns" and his
submitted GPS entry got corrupted name permanently (the same in both
setups).
Just look for names starting with non capital letters to find other
examples.
I expanded possible solutions for my problem and I think that problem goes
away if Apache has
SetEnv LC_ALL en_US.UTF-8
directive in .htaccess file (I am unable to modify httpd.conf file in
hosted environment). Locale setting is set to UTF-8 in apache and derived
environment and there is no need to use setlocale in php code anymore.
--Andris
On Tue, Jul 14, 2015 at 2:41 AM, Andris Strazdiņš andzss@gmail.com wrote:
In results sixth position correct name is "Ēriks Lebedoks" but
problematic version returns "riks Lebedoks".
On 15th position "Ģirts Pakalns" turns into "irts Pakalns" and his
submitted GPS entry got corrupted name permanently (the same in both
setups).
Just look for names starting with non capital letters to find other
examples.
Activity
Maprunner commentedon Jul 13, 2015
This doesn't happen on my test set-up or any of the installed sites I know about. Can you please provide a few more details:
What version of PHP are you using?
Is this a new RG2 installation or is it using an old RG1 database?
What are RG_INPUT_ENCODING and RG_OUTPUT_ENCODING set to in your rg2-config.php file?
Can you give me a link so that I can see the problem?
andzs commentedon Jul 13, 2015
Hello,
phpinfo() data available here http://mezu.lv/info.php
I have old RG1 database which was converted to UTF-8 and worked for a
while with RG1 Javascript version
Config
bash-4.1$ cat rg2-config.php | grep -E "^\s+define"
define('RG_BASE_DIRECTORY', 'http://izskreju.mezu.lv/gadget');
define('SPLITSBROWSER_DIRECTORY', 'http://izskreju.mezu.lv/splitsbrowser'
);
define('RG_FILE_ENCODING', 'UTF-8');
define('UI_THEME', 'smoothness');
define('HEADER_COLOUR', '#002bd9');
define('HEADER_TEXT_COLOUR', '#ffffff');
define('ADDITIONAL_INFO_TEXT', '');
4.
OK setup with setlocale (and define('RG_BASE_DIRECTORY', '
http://izskreju.mezu.lv');) http://izskreju.mezu.lv/rg2/#125
http://izskreju.mezu.lv/rg2/#125
Problematic setup without setlocale http://izskreju.mezu.lv/gadget/rg2/#125
http://izskreju.mezu.lv/gadget/rg2/#125
Take a look, please, at course M21S
In results sixth position correct name is "Ēriks Lebedoks" but problematic
version returns "riks Lebedoks".
On 15th position "Ģirts Pakalns" turns into "irts Pakalns" and his
submitted GPS entry got corrupted name permanently (the same in both
setups).
Just look for names starting with non capital letters to find other
examples.
Splitbrowser in problematic setup
http://izskreju.mezu.lv/gadget/rg2/rg2api.php?type=splitsbrowser&id=125 for
the same course will show that names are OK.
In this case rg2api is not using fgetcsv to get results, names and
everything looks fine.
--Andris
On Mon, Jul 13, 2015 at 10:29 PM, Simon Errington notifications@github.com
wrote:
Andris Strazdiņš
tel. 29248436
andzs commentedon Jul 14, 2015
Hi,
I expanded possible solutions for my problem and I think that problem goes
away if Apache has
SetEnv LC_ALL en_US.UTF-8
directive in .htaccess file (I am unable to modify httpd.conf file in
hosted environment). Locale setting is set to UTF-8 in apache and derived
environment and there is no need to use setlocale in php code anymore.
--Andris
On Tue, Jul 14, 2015 at 2:41 AM, Andris Strazdiņš andzss@gmail.com wrote:
Andris Strazdiņš
tel. 29248436