2

I am using MobaXterm to remote contact with my server. I instantly found the MobaTextEditor, the built-in tools of MobaXterm that I used it to rewrite my uploaded code on the server. However, the MobaTextEditor use GBK to decode and encode files leading to some errors because my code was save as the default encoding type of UTF-8. Is there any way to change the default encoding type of my MobaTextEditor? Any help will be greatly appreciated.

Tao Li
  • 21
  • 5

1 Answers1

1

I asked this issue to MobaX Team and received answer. They don't have yet now. (changing charset in Moba TextEditor) They told me that this issue will be added later but do not mention exact date.

So, it could be another key to resolve your problem.

In my case, I need text files on my server to read and insert in Mysql DB. I make text files with BufferedWriter with "utf-8" and read it then insert DB. therefore I do not lost word.

if you make text file,

BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "utf-8"));

if you read text file,

BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "utf-8"));

StackzOfZtuff
  • 2,534
  • 1
  • 28
  • 25
Tgif-Tgif
  • 11
  • 1
  • 1
    Thanks for your answer, I was debugging the code of the webserver at that time, and rewriting it to remove bugs. The text encoding and decoding mismatching led to code compiling errors. Fortunately, I solved it by using another code text editor such as VSCode on my local machine. Thanks for Moba text editor providing another choice to beyond the default text editor. – Tao Li Dec 18 '21 at 04:43