Overview: In Informix is it possible to enforce ASCII for a database or instance.

Details: I am trying to enforce ASCII in an instance of informix for a while. This is to help have a smooth transition between char sets: ISO Latin-1 (819) and UTF8. I would like this to be done by cleansing my current data of non ASCII characters and then exporting the data from the databases. These steps have already been done.

Then setting the character set to enforce ASCII. However I cannot find a character set that I can use that my instance allows me to change the db_locale too. My current db_locale is default aka ISO Latin 1 or 819. After I figure out the character set. I believe that I can figure out the rest. It should be just importing the data to a new database with the db_locale set to an ASCII char set.

Is this possible? I am also open to other ways of setting or enforcing ASCII at the database level.

  • I don't think there's a 'strict ASCII' character set in Informix, nor an easy way to enforce the rule that character columns should not contain any characters with the 8th bit set. In principle, a GLS character set for that could be developed and used — it wouldn't be very hard. It isn't trivial, either, though. – Jonathan Leffler Mar 4 '18 at 20:55
  • When the time comes to migrate, you could export the accented data, then use the iconv program to convert from 8859-1 to UTF8. – Jonathan Leffler Mar 4 '18 at 20:56
  • Where could I find instructions or examples of how to create a GLS character set? @JonathanLeffler – michael.moyer Mar 7 '18 at 17:13
  • I started an enquirer yesterday but the person who knows best is under deadline pressure this week. Intense, ridiculous deadline pressure. – Jonathan Leffler Mar 7 '18 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.