Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Character Encoding outside a Genero Application  (Read 9299 times)
Carl P.
Posts: 19


« on: October 27, 2021, 05:03:47 pm »

Hi,

We have a Genero v2.41 application running on Windows Server 2016 and SQL Server 17.9.1.

If we enter an address string like 'Sómé Númbér' into our application and it correctly saves it to our SQL Server database.

We have an API that we've written which takes settings, instructions and data from an XML file. The API is just run in a command window and has the following environment variables set:

set FGLDIR=C:\Program Files\FourJs\Genero Studio 2.41.45\fgl
set FGLPROFILE=%FGLDIR%\etc\fglprofile
set PATH=%FGLDIR%\bin;%FGLDIR%\lib;%PATH%
set DBDATE=DMY4/
set DBFORMAT=*:*:.:*

When the API tries to save 'Sómé Númbér' it is saved to the database as 'Sómé Númbér'.

I've been reading the documentation and I think that LANG or LC_ALL needs to be set to ensure the correct encoding. I've tried:

set LC_ALL=en-GB.utf8

but I just get an error returned saying:

Error: locale not supported by C library, check LANG.

I've tried different combinations according to this Microsoft Locale web page:

https://docs.microsoft.com/en-us/cpp/c-runtime-library/locale-names-languages-and-country-region-strings?view=msvc-160

but nothing has worked.

What do I need to change to get the correct characters saved using our API?

Thanks,

Carl
Gary C.
Posts: 109


« Reply #1 on: October 27, 2021, 05:15:27 pm »

Hi

Have you tried: LANG=en_GB.utf8

Gary
Sebastien F.
Four Js
Posts: 545


« Reply #2 on: October 27, 2021, 05:24:34 pm »

Hello,

1) First of all, consider upgrading to Genero V3.20 or V4.00 (at least for testing) ... V2.41 is quite old!
2) Read everything related to locale settings in https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_localization_038.html
3) If your sources and 42m Genero files are using UTF-8, LANG must be set to .fglutf8 (I don't think Windows Server 2016 has correct built-in support for UTF-8)
4) Regarding interaction with SQL Server, check https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_odiagmsv_017.html
5) Consider calling your support center to get help, it's quite a complex story (we can check your case together next week)

Seb
Sebastien F.
Four Js
Posts: 545


« Reply #3 on: October 27, 2021, 05:39:30 pm »

Consider also reading all upgrade notes since 2.41, especially:

https://4js.com/online_documentation/fjs-fgl-manual-html/#fgl-topics/c_fgl_Migrate_to_310_snc_widechar.html

Seb
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines