Is it possible to change file's encoding from UTF-8 to windows1251 without cyrillic information lost. Because when I explicitely change the encoding, all cyrillic symbols become unreadable?
Change file encoding without information losses in intellij idea
12k Views Asked by Sergey At
2
There are 2 best solutions below
0
Rylander
On
Newer versions of IntelliJ will ask if you would like to "Reload" or "Convert" the file to the new encoding.
I had a file that was displayed using UTF-8 but was actually written in x-macRoman. I selected x-macRoman and chose "Reload" so that the encoding would be used to interpret the file, I then chose UTF-8 and selected "Convert". Now my file is properly encoded as UTF-8
Tested With: version 12.1.3
Related Questions in ENCODING
- how to turn characters in wrong codec into space in python?
- erlang os:cmd() command with UTF8 binary
- How to encode bytes as a printable unicode string (like base64 for ascii)
- weird characters in utf-8 encoded file
- Enforcing that inputs sum to 1 and are contained in the unit interval in scikit-learn
- Detecting corrupt characters in UTF-8 encoded text file
- Why does opening a file in two different encodings work as expected?
- Is there any function like iconv in Python?
- Control encoding when parsing SPSS file using package memisc
- Escape XML on Windows Mobile 6
- MySQL php utf-8 format issues
- Can we convert ANSI encoded CSV file to utf-8 encoded file with javascript?
- How can I compress four floats into a string?
- Represent string as an integer in python
- Character encoding is missing at a point
Related Questions in UTF-8
- Site code to enable UTF-8 to EBCDIC encoding
- Wrong output when str_replace with acute ( ´ ) in utf-8 website
- How to encode bytes as a printable unicode string (like base64 for ascii)
- showing umlauts in html with utf8 charset
- Replace special qoutes with normal
- wxWidgets and UTF8 - some characters missing
- Detecting corrupt characters in UTF-8 encoded text file
- Control encoding when parsing SPSS file using package memisc
- Slidify no longer renders accent marks
- javascript treating special characters as utf characters
- Character encoding is missing at a point
- Search special characters with pg_search
- Hot deploying HTML templates generates question marks in the place of chinese characters - only on CentOS
- Reading from property file containing utf 8 character
- Problems with UTF8 text in XE7 ReadLn command
Related Questions in INTELLIJ-IDEA
- How to Enable MultiDex Support in Intellij IDEA
- Where has "Show Type Info on Mouse Motion" gone in Intellij 14
- Simple JavaEE HTML GET/POST application
- Behaviour Difference: Intellij vs Eclipse
- IntelliJ warns "Cannot resolve variable" on EL variables declared in parent page of include
- Perforce workspaces and multiple branches
- How to invoke method/constructor parameter hint in IntelliJ?
- Breakpoint "concurrency" in Intellij
- How do I install Intellij on Ubuntu 15.04?
- How to disable Code Completion in Android Studio?
- How to unchain my program?
- How can I debug scala.js unit tests?
- Weblogic 12c web application not start properly after server reboot
- What is the principle of IntelliJ IDEA's remote debug?
- Node.js setup on Intellij Idea
Related Questions in CP1251
- How to make Cyrillic characters display correctly when converting to PDF with itextpdf?
- Sending "windows-1251"-encoded string in JSON from python to javascript
- Decoding a url-encoded windows-1251 (cp1251) string with JavaScript
- xml to php and parse encoding error
- Change file encoding without information losses in intellij idea
- The proper way of encoding detection in perl
- Browser displaying page in UTF-8 instead of windows-1251
- Recovering filenames with bad encoding
- How to convert a string from cp1251 to UTF-8 in Python3?
- Encoding issue while reading Paradox database using Java
- html page displays cyrillic symbols OK, if contains charset=windows-1251, but not utf-8
- Builder c++ Rave Reports encoding problem with cyrillic
- Convert Subversion commit messages to Unicode
- UTF-8 symbols and cp1251 site
- How decode windowsCP1251 percent encoded String ? Swift 4 ios 11
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
UPDATE: new IDE versions can convert encodings:
The problem is that IntelliJ IDEA doesn't actually convert your file encoding from
UTF-8towindows-1251, what happens is that you tell IntelliJ IDEA to treatUTF-8file as being encoded inwindows-1251, so you will see garbage in the editor. The actual file on disk remains inUTF-8.You have to use some external tool to perform the conversion, such as iconv: