intellij idea file encoding - intellij-idea

I am using Dokker in Intellij idea.
I have a problem with log file encoding in Intellij idea.
I created a python project in which there is only one line of code that prints the Russian word "Привет"
I am running a project in Docker. In the log file, shows RџСЂРёРІРµС
This kind of issue is only observed by Intellij idea. There is no such problem Visual Studio Code.
I changed the encoding and it does not help https://www.jetbrains.com/help/idea/encoding.html#single-file
How to fix this problem?

Related

Code analysis in JetBrains Rider does not work

I started using Rider 2022.1.2 for C++.
I can see errors in the current file in the Problems->Current File tab, but I don't see any errors in the Problems->All solution files tab. Solution analysis enabled.
What's wrong?

Downloaded PyCharm and now Java is broken in IntelliJ

Like the title says, I downloaded Pycharm and now my Java project in Intellij is broken. IntelliJ was totally fine beforehand. I know have errors in every file in random places. I also had errors on java imports such as "import java.util.List", (resolved now, see below).
In IntelliJ, I went to File > Project Structure and saw that the SDK was set to Python 3. I changed that JDK 1.8 that I already had set up. That resolved the import errors but I now have weird methods that can't resolve such as concat() or orElse().
Any ideas??
To fix this, I had to right click on the pom file and click "add as maven project"

IntelliJ Idea red Spring and Lombok annotations

I have a problem with IntelliJ Idea 2020.1 Ultimate Edition. It shows Lombok and Spring annotations and imports in red. The project compiles, I can run tests. I did some googling. I tried to reimport maven projects and go to File->Invalidate Caches/Restart. Then I deleted Idea system directory - it does not help. Before it worked fine, I do not know why it started doing this. Can somebody help me out?
I am not sure it is a correct solution, but it worked for me. I just reinstalled IDEA. It was faster that talk to IDEA support trying to figure out what is the cause of the issue
I got the same problem and fixed it from this way. First download lombok dependency from spring.
Then go to IDE and paste it to pom file and run. It isn't fix your problem. Go to Choose this and clear cache. Then restart.
If isn't fix your problem then go to this site and download relevant version of lombok for your IDE. https://plugins.jetbrains.com/plugin/6317-lombok
enter image description here
Then it will download a file. Then go to where you install the IDE and go to this path and paste that lombok java file.
IDE path
After trying these methods error was fixed. Thank you.

IntelliJ IDEA is not finding Play Twirl templates (sometimes)

I'm developing a Play Java 2.4.x application that's pretty much following all the Play conventions.
When viewing the project in IntelliJ IDEA Ultimate, the Twirl templates are usually marked as "cannot resolve symbol" in the import statements. Sometimes and inexplicably (to me), they will show up ok.
I can ctrl-click on any of the templates and IDEA will show me the compiled Scala file. Even if they are marked as "cannot resolve"
For instance, this screenshot shows a few templates as ok, but others not:
The templates are in /app/views/**.scala.html
Twirl compiles them to /target/scala-2.11/twirl/main/views/html/**.template.scala
And Scala compiles them to /target/scala-2.11/classes/views/html/**.class
I am running IntelliJ IDEA Ultimate 2016.3.4 with Playframework support plugin version 1.0
sbt run works perfectly fine on this project and has never complained about the missing templates.
Here is my sources configuration (most of that seems to be autogenerated, I've tried cleaning it up, but something keeps adding all the ones in red back in)
There is an open bug which looks like your problem:
SCL-10578 2012.2: Cannot resolve symbol on twirl template import

Inspecting code on a non-java IntelliJ IDEA project

I'm using IntelliJ IDEA to build a non-java project, it is just a PHP + Javascript project, everything is working just fine but when I try to Inspect all the code in the project (Analyze -> Inspect Code) I get an error:
The JDK is not configured properly for this project. Inspection cannot proceed.
Am I doing something wrong? Do I have to configure an SDK even though the project is not java?
Note: The automatic code inspection for working files opened in the editor is working fine, the only problem is when I try to inspec all the code in the project.
Note 2: I cannot use PHPStorm neither Webstorm.
Thanks.
In my case, I didn't wanted to delete the module since I have a bunch of stuff configured (data sources, dictionaries, http requests) and a lot of code in the shelf (which I believe it's stored along the project/module). I found that you can skip the "delete your module" part and instead just update the module config:
Find the $module.iml file (in my case it's inside the .idea directory) and at the top there's was a line:
<module type="JAVA_MODULE" version="4">
which I changed to:
<module type="WEB_MODULE" version="4">
The issue was fixed and I haven't seen any side-effects but, just in case, you might want to backup the .idea directory.
I raised this over at https://youtrack.jetbrains.com/issue/IDEA-188017 - after some back and forth, the Jetbrains employee helped me figure out that I had a Java module in there.
If you are not using Java, please crate a module of a Static Web type. Now you have a module of a Java type, that is why the error is reported, so such behaviour is expected.
Delete your Java module.
Once you enter in the menu in the screenshot below, find the Static Web type and create your module like that.
Seems like adding a SDK the code analyzer works just fine, even though the project has no single java module.
Maybe it is a bug, so I will report it.
My project's .idea/<project>.iml file had an entry:
<orderEntry type="inheritedJdk" />
I quit Idea, removed the line above from the iml file, restarted Idea and the next Inspection ran without any issues.
I recently ran into this issue with my purely Python project.
After much frustation, I bumped into a rather bizarre solution:
When IntelliJ complained that JDK is not configured, in the following dialog box, I just selected JDK8 (instead of Python 3.7.2 path) and viola! its gone.
My environment was
IntelliJ IDEA 2018.3.4 (Community Edition)
Build #IC-183.5429.30, built on January 29, 2019
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.2