Android Studio renders file content with unreadable characters - character-encoding

Any file from any project I open is rendered with these weird unreadable characters.
It seems only constant field names are displayed correctly, as can be seen in view ids scroll and resultados and the layout name activity_main.The rest of texts in the IDE are correctly rendered. But the file contents are displayed with these strange characters.
However, when I copy and paste them somewehere else outside Andrid Studio, (for example, Notepad++ or Word) they are displayed correctly.
I can't fix it any way! I've tried changing the file enconding, opening a new project, creating a new project, restarting and invalidating cache, rebooting my PC. Only thing I'm left to do is reinstalling Android Studio.

The problem was the font was corrupt. I remembered that I had recently reinstalled the Hack font on my Windows, and it seems there is some issue regarding the way you install it. You cannot copy the font files to the Fonts folder in Windows. You must use an installer provided by Hack developers and restart after installing.
So just either change the font under File > Settings > Editor > Font or use the Hack installer to get it working correctly

Related

Delphi not opening projects

I have been using Delphi 2010 for some time with no issues but recently every time I try to open a project I get a dialog box asking me to open the project
with a folder that doesn't exist. How do I change the path Delphi opens projects.
Assuming you are using Windows...(up to 10 anyway)
Right click on the project's DPR and choose Properties.
What does the Opens with: line say? Mine says bdsLauncher.exe
If it says anything else, then you somehow had the system change it directly or indirectly. Virus, installation of some other text editor, whatever...not a big deal in any case. Do the same check for files with extensions DPROJ, GROUPPROJ, ...
If you need to change it, the file should be in a path similar to my C:\Program Files (x86)\Embarcadero\Studio\21.0\bin except that your version isn't 21.0
I did have issues once upon a time with XE7 where I had to set DPR to open with bds.exe, and DPROJ opened fine with bdsLauncher, but it was probably due to IT's setup of my laptop for someone else, and something with the Win 10 software reset (instead of a format or restore from clone) when they gave it to me. Installing an XE7 update fixed the problem, and it hasn't been an issue since we moved to 10.4

Spyder IDE Console and Filename fonts are super huge

I opened Spyder IDE (Anaconda) and found that the console font and icons are super huge (see image).Spyder IDE font is huge
I tried looking through Preferences but couldn't find anything to reset things to normal.
Thanks for the help
I tried modifying the DPI as suggested here:https://superuser.com/questions/1473131/control-font-size-of-spyder-python-ide-on-everything-except-the-editor-code
But that still leaves the same result.

Delphi Automatically changing size of components and fonts between users

I've just came across a very very disturbing issue. I work with another programer and we share the code thru SVN. There's this project we're working on that I had started first. I've modelled all the layouts and did all the forms already, and some code also. So far so good. But the issue is, whenever my peer gets the files from the server, when Delphi loads the project, it messes up all FontSizes of all VCL components, along with all heights and widths.
Just to ilustrate, this is what mine looks like
And this is what his looks like
It's the same files, we copied directly from the SVN server, we tried getting the files directly from my computer, but to no success. We have a spare computer from an employee that left the company, and on that PC, it works! All properties get messed up when he loads my project files (double clicking the .dpr and .dproj)
We all use Windows 8 64bit and Rad Studio XE2. Any help would be appreciated.

Best way to add icon to delphi 2007 app (win7)

I want to add icon to my delphi app. Icon was generated from image via ICOFX, including 128x128 and 256x256 (Vista) icons. I tried to add icon several times:
First of all, using Code Gear IDE: Project Options->Application->Icon. This was an easy way, but Vista-sized icons (128x128 and 256x256) were not added. When scaling in Windows Explorer Ctrl+Wheel, icon stoped increasing in size after 64x64. This happens because Delphi does not support big icons.
Then I tried to change icon in MyProject.RES file (using ResourseExplorer). It did not helped much.
When changing .exe-file icon using ResourseExplorer problems seems to be solved, but this is not a Path of a jedi, obviously. And some problems appears/remains, such as:
when changing .exe-file name (ex: from MEPROG.EXE to _MYPROG.EXE), file icon is changing either (128x128 and 256x256 icons disappeare).
when using MouseRightButton->Send to->Desktop to create a label, label's icon is of small resolution.
copy-pasting exe-file into some other directory(not in deplhi project output dir), could also change icon.
Is there a better way to do this, or I am doing this wrong way?
The Delphi 2007 IDE cannot handle large Vista icons, which use PNG compression. And neither can the brcc32 resource compiler that ships with Delphi 2007.
My solution, when I was still using legacy Delphi versions, was to make a .rc file containing the icons, and compile using the MS resource compiler, rc. The MS resource compiler does support such icons, and is readily available, for example with the Windows SDK.
See the change-log around 2.7 version
http://andy.jgknet.de/blog/ide-tools/ide-fix-pack/
it seems you just try to use Delphi without installing necessary fixes
PS. another way might be to make some command-line utility replacing icon resource and then auto-call it after compilation phase. Still ugly, but better than manually launchign ResEdit each time.
If you do not see the icon, you can just run the following command to clear the icon cache:
ie4uinit.exe -ClearIconCache
For Windows 10, use:
ie4uinit.exe -show

How to close all IDE "New Edit Windows" (some of which are not visible)

Recently in the D7 IDE, I started using the "New Edit Window" option.
Now, it seems that I have several non-visible edit windows, because sometimes the title bar for a particular window will have the filename followed by a colon and number, as shown below.
This can be confusing, since sometimes use File, Open to open a .pas file and nothing seems to happen, because, I suspect the code is already in an open (but hidden) windows.
I've tried closing all the windows I can see, etc, but these title bars with a number following the filename keep re-appearing, sometimes floating over other editing windows.
Is there a surefire way to close all edit windows so I'm back to just having one?
Additional information in response to comments:
I am able to close the individual files (tabs) in window with the standard Ctrl-F4. And when the last file is closed, the window disappears as it should. But sometimes when I open a new file, it opens in a new editing window (as if I'd actually clicked on the "New Edit Window" option in the context menu.) It appears that there are several windows that were created by "New Edit Window" commands that are hidden and sometimes are used to display newly opened files.
Cause:
This is due to the Autosave Editor files option in the environment settings.
When this is enabled, windows that aren't explicitly closed within the project session are indeed remembered by that option. Although, there really are no hidden windows, just the count of previously created windows is stored.
Solution:
Delete the corresponding Delphi Desktop File (*.dsk) from the project folder, or manually edit that file and rewrite EditWindowCount=4 to EditWindowCount=1 within the [Modules] section.

Resources