Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1216

Code page and character set conversion with z/OS files in USS

$
0
0

I'm having issues uploading .html files to our z/OS USS environment - specifically character set and code page conversions.

I telnet in with PuTTy, upload with WinSCP, and edit with Notepad++, but have the strange situation whereby I can have a USS shell session going and can CAT and VI a file and if it looks OK, it'll be displayed by the z/OS web server OK, but then if I try to edit it from WinSCP, I just get garbage:

LZÄÖÃãè×Å@ˆ£”“nLˆ£”“@n@@Lˆ…„n@@@@L”…£@ƒˆ™¢…£~äãÆ`øn@@@@L£‰£“…nÃÉÃâ@

similarly, if it looks OK in Notepad++ then it'll look like garbage when served as a web page.

I have the text file traansfer options on and if I list the files in aa shell session I get:

t UTF-8       T=on  -rw-r--r--   1 JOCS065  JOCS2       9824 Jul 30 14:45 JS_Graphviz.htmlt UTF-8       T=on  -rw-r--r--   1 JOCS065  JOCS2      29370 Jul 30 14:15 JS_Graphviz_new.html

JS_Graphviz.html won't show as a webpage but JS_Graphviz_new.html will.

Both have <meta charset="utf-8">, notepad++ shows both as ANSI.

Oddly, if I take the good code from Notepad++, and then edit the same file in vi via my shell session, delete everything and paste in the code I copied from Notepad++, it can then be served by the web server (and look like garbage in NPP etc).

So there's obviously some hidden flag or setting for the code page or character set. Does anyone have a rock-solid editing solution for text files in USS on z/OS?

EDIT

Screenshot showing errors with JavaScript files

Chrome Inspect window


Viewing all articles
Browse latest Browse all 1216

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>