ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Losing € symbol when YAJL-ing to DB2 via Apache

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Losing € symbol when YAJL-ing to DB2 via Apache

    Hi,

    Would anyone be able to offer some guidance with the following problem:

    We have a JSON file sitting in an IFS folder. The file contains the € symbol.
    The CCSID of this file is 819 (The file was loaded into IFS via Apache server which hasDefaultNetCCSID 00819 specified).

    When this file is then YAJL'd into DB2 files we loose the € symbol.
    The QZSRCGI job that YAJL is running under has a CCSID 1146
    (the Apache server has CGIJobCCSID 01146.

    When the same YAJL program is run interactively the € symbol is successfully loaded into DB2.
    The interactive job has a CCSID 65535.

    Is there a more appropriate setting for DefaultNetCCSID in this instance?

    We've also tried DefaultNetCCSID 1252 (same result) and DefaultNetCCSID 1208 (fails - as URI comes through Apache garbled)

    Thank you,
    Séamus





  • #2
    How can you possibly have a file in CCSID 819 that has a euro symbol? CCSID 819 is the iso-8859-1 standard, which was from the 1980s, long before the euro existed. There isn't a code point for euro in iso-8859-1.

    Windows-1252 is simply iso-8859-1 with a few of the control characters replaced. It also is an older standard, I can't imagine it supports the euro symbol?

    CCSID 1208 (UTF-8) does support it, and is almost 100% of the time the correct choice for JSON data.

    Comment

    Working...
    X