O4W UTF-8 characters (OpenInsight 64-bit)
At 18 MAR 2020 03:05:57PM Mihyar Al Masalma wrote:
Hi there,
I have the system setup to use UTF-8 mode under Application Properties.
Working with form with French labels, when the pages are displayed with some special characters like French accent character it appears as question mark character.
the HTML template has
<meta charset="UTF-8">any idea why these characters wouldn't show would be greatly appreciated.
cheers,
At 19 MAR 2020 11:18AM D Harmacek wrote:
In 32-bit O4W I had to "call setutf8( 1)" for every connection. I have no experience with O4W in 64-bit at this time.
Dave Harmacek - Harmacek Database Systems - near Boston, MA USA
At 19 MAR 2020 11:29AM bshumsky wrote:
Hi there,
I have the system setup to use UTF-8 mode under Application Properties.
Working with form with French labels, when the pages are displayed with some special characters like French accent character it appears as question mark character.
the HTML template has
<meta charset="UTF-8">any idea why these characters wouldn't show would be greatly appreciated.
cheers,
Hi, Mihyar. When you run OpenInsight on the desktop, it's actually a "presentation server" (named OPENINSIGHT.exe) talking to a "database engine" (named openengine.dll). The database engine stores all the data, and serves it up to the presentation server (which is what runs your forms). When the presentation server connects to the database engine, it tells the engine whether it wants data to be interpreted as ANSI or UTF8. That's why you see the data correctly in your forms.
However, that flag ("is the data ANSI or UTF8?") isn't stored with the data; as I mentioned, it's actually passed in by the presentation server when it connects. So the engine has no idea that the data is ANSI or UTF8 until it's told.
When you're using O4W, it's not the presentation server that connects to the database engine; instead, it's the engine server. And so the flag that the presentation server passes in, doesn't get passed in. So, how can we tell the database engine it's in UTF8 mode then?
In the engine server, if a client (like O4W) connects using the "normal" port (by default, 18088), then it tells the database engine to start up in ANSI mode. However, if the client connects using the "UTF8" port (by default, 18099), then it tells the database engine to start up in UTF8 mode. So I think one solution _might_ be to try changing your connection information to use the UTF8 port instead of the "normal" (ANSI) port.
Note that you might have to enable the UTF8 port, in case it's currently disabled. Depending on how you modify/update your engine server configuration file (eserver.cfg), you could look for the UTF8Port_Disabled line; if it says UTF8Port_Disabled=1, change it to be UTF8Port_Disabled=0, save your eserver.cfg, and restart your engine server.
- Bryan Shumsky
At 19 MAR 2020 02:34PM bshumsky wrote:
In 32-bit O4W I had to "call setutf8( 1)" for every connection. I have no experience with O4W in 64-bit at this time.
Dave Harmacek - Harmacek Database Systems - near Boston, MA USA
Yes, if he's using an O4W custom stored procedure, or can add something in the "start up" process to set utf8 mode, then that would also work; if he's using a wizard-generated form, dashboard, or report, then I think the only option might be to try the UTF8Port…
- Bryan Shumsky