search
HomeBackend DevelopmentPython TutorialSome explanations on the garbled code problem in eclipse
Some explanations on the garbled code problem in eclipseJul 22, 2017 am 10:43 AM
eclipseGarbled charactersSummarize

The Eclipse console must be encoded in GBK. Therefore, condition 1 and condition 4 must be met at the same time, otherwise the operation will still be garbled. To ensure that it is not garbled code.

##Condition 1, Window | Preferences | Workspace | Text fileencoding | GBK encoding.
This defines the encoding of the entire work area.
This will determine the encoding format of the entire workspace, but if a certain project uses a different encoding format, it will be solved separately. As follows:


Condition 2, right-click on the project | Properties | Resource | Text fileencoding | UTF-8 encoding. Or a suitable encoding format. What is defined in this way is the encoding of the entire project.


#This will determine the encoding format of the entire project, but if a certain file uses a different encoding format, it will be solved separately. As follows:


Condition 3, right-click on a file | Properties | Resource | Text fileencoding | UTF-8 encoding.

or a suitable encoding format. What is defined in this way is the encoding of a single file.
What I want to say here is that the actual encoding format of the file should be used first: 3rd, then 2, and finally 1. Sometimes it's 123 and the conditions must be met. No matter how you try these encoding formats, you will know everything.


Condition 4, and the runtime encoding settings are as follows: Menu: Run Configuration | Console Encoding of Common tab on the right selects GBK encoding. This is used to control the console display. It must be GBK, so there will be no garbled characters. Although conditions 1, 2, and 3 are not GBK, as long as 4 is GBK. The console will not be garbled.
This ensures that the workspace and project code programming methods do not conflict with the encoding format of individual files in the project.
If there is no GBK option, it doesn’t matter. Just enter the three letters of GBK directly, Apply, and the GBK-encoded Chinese is no longer garbled.

One day, if we want to change the encoding format of other people's code, use the following methods: 1: Open it with Notepad, 2: Change the following encoding format such as UTF-8, 3: Save it as xxx.java

. In this way, the saved encoding format becomes the encoding format you want.

The above is the detailed content of Some explanations on the garbled code problem in eclipse. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
使用Eclipse进行Linux Shell脚本开发的基本配置指南使用Eclipse进行Linux Shell脚本开发的基本配置指南Jul 06, 2023 pm 05:00 PM

使用Eclipse进行LinuxShell脚本开发的基本配置指南在Linux环境下,Shell脚本是一种强大且常用的编程语言,用于自动化执行各种任务和管理系统。Eclipse是一款功能强大的集成开发环境(IDE),可以帮助开发人员更高效地编写、调试和管理Shell脚本。本文将介绍如何在Eclipse中配置和使用Shell脚本开发环境。第一步:安装Eclip

eclipse如何显示行号eclipse如何显示行号Dec 24, 2020 am 11:03 AM

eclipse显示行号的方法:1、直接输入快捷键“CTRL+F10”,勾选“show line numbers”;2、右键点击其侧边栏,勾选“show line numbers”;3、在Eclipse菜单栏中设置显示行号即可。

eclipse怎么设置中文eclipse怎么设置中文Jul 24, 2023 am 11:02 AM

eclipse设置中文方法:1、启动Eclipse,在启动界面的工具栏上点击"Preferences"按钮;2、弹出的首选项对话框中,点击"General"选项;3、在"General"选项下,点击"Appearance"子选项;4、点击"Language"选择框,选择“中文”即可设置成中文;5、关闭eclipse,重启即可使用中文。

使用Eclipse进行Linux Shell脚本自动化的基本配置指南使用Eclipse进行Linux Shell脚本自动化的基本配置指南Jul 04, 2023 pm 06:49 PM

使用Eclipse进行LinuxShell脚本自动化的基本配置指南简介:LinuxShell脚本是一种强大的自动化工具,用于在Linux操作系统中执行一系列命令和操作。Eclipse是一种流行的集成开发环境(IDE),主要用于Java开发,但也可以用于编辑和执行Shell脚本。本文将介绍如何在Eclipse中配置和使用Shell脚本的自动化工具。安装Ec

eclipse创建springboot项目的方式有哪些eclipse创建springboot项目的方式有哪些May 22, 2023 pm 07:19 PM

方法一安装STS插件安装插件导向窗口完成后,在eclipse右下角将会出现安装插件的进度,等插件安装完成后重启eclipse生效新建springboot项目项目启动方法二1.创建Maven项目2.选择项目类型3.选择项目4.编写项目组和名称-finish即可5.修改pom.xml文件org.springframework.bootspring-boot-starter-parent2.0.2.RELEASE6.pom.xml中添加依赖org.springframework.bootspring-

eclipse左侧项目栏不见了怎么解决eclipse左侧项目栏不见了怎么解决Feb 19, 2021 pm 05:14 PM

解决方法:首先打开eclipse软件,点击顶部导航栏中的“window”选项;然后在打开的下拉菜单中,点击“show view”选项;接着在打开的菜单中,点击“project Exlorer”选项即可调出左侧项目栏。

Java错误:Eclipse错误,如何解决和避免Java错误:Eclipse错误,如何解决和避免Jun 25, 2023 am 09:09 AM

Java作为一种非常强大和流行的编程语言,被广泛应用于各种计算机应用和开发领域。在编写Java代码时,经常会遇到各种错误信息,这些错误信息可能会影响代码的正常编译和运行。其中,Eclipse是一种广泛使用的集成开发环境,而在Eclipse中遇到错误也是相当常见的。本文将探讨一些常见的Eclipse错误,并提供解决和避免这些错误的方法。一、常见的Eclipse

怎么将eclipse语言设置为中文怎么将eclipse语言设置为中文Jan 04, 2023 pm 03:50 PM

eclipse语言设置为中文的方法:1、打开浏览器找到语言包下载地址,并将最新的安装包地址复制;2、打开eclipse,点击“help”,然后点击安装新的插件;3、点击“Add”,在Location中粘帖网址;4、在下拉菜单中找到简体中文包,进行勾选,点击Next等待安装;5、重启eclipse即可。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment