Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Cdh6.0.1 does not support Chinese by default

Cdh6.0.1 does not support Chinese by default

New Contributor

Chinese scrambling code in cdh6 oozie scheduling shell

 

Resolvent

Add in the first line of the file

Export LANG = zh_CN.UTF-8

 

 

 

In spark

The original code for the old cluster running: Val = md5. digest (encryptStr. getBytes ()) is no problem.

There is a problem with running on the new cluster. The result of the Chinese string. getBytes () is?????? Coding problem, code to add.

Val e = md5. digest (encryptStr. getBytes (Charset. forName ("utf-8"))

 

 

1 REPLY 1

Re: Cdh6.0.1 does not support Chinese by default

New Contributor
IN spark

Byte conversion will scramble if no encoding is specified