Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a text file created on a Windows machine, the page coding used on the file is 1252

This file is then ftp'd to an iSeries machine for processing

As far as I can see, it appears on the iSeries. It has a CCSID of 037.

Sometimes this file contains French characters (e.g. é). When this happens, the FTP will fail with a truncation error as the french character gets converted to some extra junk: �.

The file is fixed block so the line does get truncated due to the one character turning into 3.

I can convert the French characters to characters without the accents before sending but would prefer to keep everything intact. So is there a way to retain them and send the file over properly?

I'm very green on iSeries, mainly a Windows guy.

share|improve this question

migrated from stackoverflow.com Oct 6 '12 at 14:24

This question came from our site for professional and enthusiast programmers.

    
Try setting your CCSID to 500 (See: iSeries CCSID‌​) –  NealB Oct 4 '12 at 15:45
    
Thanks, I changed the CCSID to 500 and same result Oddly I just found that our production env already was 500 but in test it was 37 for some reason, both are now 500 and no luck –  MikeM Oct 4 '12 at 16:05
    
How about converting the file to UTF-8, and send it as binary? –  neu242 Oct 8 '12 at 6:30

1 Answer 1

What you are dealing with is that Windows-1252 usually claims to be ISO-8859-1 Latin-1, but it really isn't. There is a small section - like sixteen code points or so - that Microsoft has decided to use for characters like typographic quotation marks (aka. "smart quotes") instead.

My best guess is that your transfer software (either by configuration or developer's decision) assumes that Win-1252 is equal to ISO-8859-1. Fix that (if possible) and you fix the problem.

share|improve this answer
    
BTW, the accented E is in the problem code plane...sorry I didn't mention that in the original answer. –  JoeZitzelberger Oct 8 '12 at 5:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.