IntelliJ refuses to read properties file as anything other than UTF-8

已回答

I've been scratching my head over this for a few hours now. properties files are encoded in ISO-8859-1 by default, as we all know. But in my current project, IntelliJ insists on reading them as UTF-8. I've set properties file encoding to ISO-8859-1 in File Encoding -> Properties file encoding, I've tried enabling and disabling transparent ascii conversion, all to no avail. IntelliJ insists on thinking my properties files are UTF-8.

I've verified using the 'file' command that the file is indeed encoded in ISO-8859. I've tried running the 'native2ascii' tool on the file in order to ensure that it is ISO-8859-1 encoded with unicode escape sequences for all non-ascii characters. Still, IntelliJ stubburnly loads (and consequently saves) the file as UTF-8, causing all sorts of problems.

I have to edit this particular file in an outside tool, which is absolutely ridiculous. What gives?

0

No sooner had I written this post, than the solution presented itself: I had been changing settings for the default project, and not for my current, active project. As soon as I made the corrections in the right place, it all fell into place.

Problem Existed Between Keyboard And Chair.

0

请先登录再写评论。