I didn't find anything related to my problem in the whole web (so even not on stackoverflow) and I'm thinking that maybe I'm not searhcing with the right keywords...
Anyway here is my question:
Lately Visual Studio started to replace unicode escape sequences automatically with the real character e.g.: '\u00e4' will be replaced with 'ä'. It happens every time when I'm changing something on the json-file. If I'm doing the changes somewhere else I don't see that the replacement happened and Visual Studio doesn't mark this as a change (luckily SVN shows me this as change). Often I notice this problem not until I see it in the application.
Even when I try to correct this mistake with replacing 'ä' by copy & paste with '\u00e4' it will be directly converted to 'ä'. If I type '\u00e4' in manually everything is fine till next time.
What can cause this behaviour and how can I fix this? I'm also using Resharper and maybe this causes somehow the behaviour?
Related
I have a small problem with Visual Studio Code, I can't find place to change language of FIX tooltip(please check attached screen shot), I hate to use Polish lang in programs, a specialy when it's mixed with English UI. I can't find any solution online.
Configuration display language (after CTRL+Shift+P) is set to
{
// Defines VS Code's display language.
// See https://go.microsoft.com/fwlink/?LinkId=761051 for a list of supported languages.
"locale":"en" // Changes will not take effect until VS Code has been restarted.
Any suggestions?
The Quick Fix strings are part of the C# extension and not VS Code itself.
Assuming you're using ms-vscode.csharp, the issue you've described seems stuck in the issue tracker.
The workaround is to delete the OmniSharp localization files directory matching your Windows display language, in my case located here (your version will vary): C:\Users\%username%\.vscode\extensions\ms-vscode.csharp-1.19.1\.omnisharp\1.32.19\pl, after which the Quick Fix and debugging messages language will fall back to English.
Since I ran into the same problem with VS Code version 1.68.1, and the last answer by droopysinger is not applicable anymore, I dared to answer again.
I only used VS Code for C++ so the respective folder might change for your cases (see 'cpptools' in path).
However, navigate to folder
C:\Users\Username\ .vscode\extensions\ms-vscode.cpptools-1.10.7-win32-x64\bin\messages
and delete all folders for the different languages. From the next start of VS Code, the language for Quick Fix messages should fall back to English again.
Note: in my case there was no folder for english messages. After deleting said folders, the folder ...\messages was empty.
As I mentioned in the title, the power went of for 2 minutes, and my PC turned off while I was writing some HTML. After I turned it back on my code turned into binary and I don't know how to recover it. I use Sublime Text 3. I've also tried opening it in Notepad++, but it looks the same.
Sublime
Notepad++
Is this something that can help you?
I don't know if the binaries are the compiled HTML code or just plain text symbols calculated into binaries.
If the second one is the case then you might be able to recover it with something like the link above. Of course if sublime encodes with 16 or 32 bits "per sign" then you will have to use some other algorithm. This should not be too difficult to implement though (in Java for example).
If the text looks like
0101010001101000011001010010000001110001
then every sign is encoded with exacly the same number of bits so you can just try to split it every 8th bit (or 16th, or 32nd) and use the above or equal algorithm to decode that.
If your binaries is a compiled code then I am not aware of any way to decompile binaries into HTML although such algorithm should exist somewhere.
EDIT: Be aware that, since your editor broke unexpectedly, the file might be corrupt and the code will be slightly different or destroyed completely. In this case there is nothing you can do, unless the corruption can be undone.
I think I am in a world of hurt right now. I have written a script in Eclpse. This is the first time I've used it. Because I work in ArcGIS a lot, I learned how to script using IDLE. I made the switch to Eclipse on the recommendation of a coworker and I love the environment, however, I've done something to my script that is messing up the indentation and to eb hoenst, I don't know how I did it. I get this weird behavior.
In Eclipse, I receive an error "inconsistent Indent at line....". It's weird, because that specific line appears to be in the right indented spot.
I will open the script in IDLE and the line appears to be in a different indented location than what I see in Eclipse. This would explain the error, but it doesn't explain why the line appears indented in one IDE and not in the other.
I think I learned that it has something to do with the space-tab, tab-space option under 'Source' in Eclipse and the Tabify/Untabify option under 'Format' in IDLE. I try to fix it in one IDE, but then it either tabs too much or too little in the other. I'm at a loss. I think I havea mix tab/space thing going on and I want to fix it so that isn't happening. Does this sound like what my problem is? How do I fix it? How do I set Eclipse so that when this error comes up, the line is displaying the indentation in the wrong location so that I can identify why this error is coming up?
IDEs have an option to replace tab char with spaces and another option to indent by 'n' chars per tab (whether it will be replaced by spaces or not). It sounds like your IDEs have different settings for these.
If you configure both IDEs to do the same thing for tab replacement and indent, then retabify the source once, you should be OK.
I have been using Sublime for a few months with great enjoyment until yesterday when something was corrupted and I needed to reinstall.
Since I thought I had all the packages I used memorized, I didn't keep a backup and did a full uninstall/reinstall of the app and the application support folder.
One of the features I really liked was that if I pasted in copy from another source, like Word, all the characters like curly quotes, etc. would be highlighted in hot pink.
This is no longer working and I believe it must've been a package I installed and didn't realize it. It saves a lot of time if you have to convert text to HTML content.
Does anyone know what package that is or how to get that behavior back in ST2?
I have been all over Google and cannot figure out how this was working. My mistake for throwing my settings/packages away.
I recently wrote a plugin dedicated to this exact problem: highlighting non-ascii characters.
https://github.com/TuureKaunisto/highlight-dodgy-chars
The plugin works on a whitelist principle: all non-ascii characters that are not whitelisted in the settings get highlighted.
I think the package you're after is Highlighter. It highlights a few unicode characters in that hot pink you referred to. You can add more matches via settings (example).
Are there any microscopic reasons at all (beyond superstition), to add an extra return after </html> in (X)HTML documents?
Is there any significant reason at all, not to stop this habit of mine? (To me, it looks a lot cleaner with the last line number being the same as the last bit of code, but I'm curious to know if there are any known consequences/possible effects between keeping or not keeping the extra return, such as the last line not being interpreted or something like that.)
It's just superstition. If I remember correctly, one of the earlier IE versions (2 or 3) would throw an error if you didn't have an extra line break there, but I think that hasn't mattered for quite some time.
One reason is because some lazily-programmed parsers are programmed to read a line at a time using linefeed or carriage-return-line-feed, and if the data stream just ends then it either won't parse the last line or it will just fail. I have experienced some C compilers and some versions of Make will complain if the last line doesn't contain a linefeed. Obviously these are not HTML, but the reason holds.
I always add an extra linefeed out of habit for this reason.
Are you using a VCS? Historically, some version control systems moan about a missing line end at end-of-file; I believe this may be due to diff and patch being (originally) a bit fussy about this.
Not exactly superstition; perhaps we could classify it as an obsolete urban legend (plenty of those in this business).
I always end my files with a linefeed.
At one time I had a automatic tool that would concatenate all JavaScript files in a directory into a single file (to save HTTP requests). This would break if a file didn't end in a newline and also didn't end with a semicolon.
Ever since then I've ended files with a newline.
Also, if you use a command line shell like bash, and you cat a file; The new prompt will appear after the last character in the file, so it looks a lot better if that's a newline.
It makes no difference
Nope, like Patrick says it doesn't matter. The entire page can be on one line if you want.
One thing's for sure, no modern well-known browser is going to care. Indeed in HTML, as opposed to XHTML, the </html> tag is superfluous too.
However, in your first sentence you ask for microscopic reasons and I have one. Some editors (I think notepad used to be one, I haven't checked lately) will automatically add a CR/LF to the last line of a file on save if the line is not empty, probably to fix problems such as the ones DevelopersDevelopersDevelopers describes. This used to be a real irritation when editing DOS batch files as an extra line could adversely affect the way the script terminated.
As a result, if you create your HTML in one editor which doesn't do this, and you don't manually add the final CR/LF, then later someone opens the file in a editor which does, doesn't change anything and saves, you get an erroneous difference that can show up in when searching for real changes or in version control logs.
In your second sentence, you ask for significant reasons. This is not, IMO, a significant reason, and I certainly would bother about such an edge case.
I don't think there is any good reason. Maybe without the return less data is transmitted so you can save traffic. But I don't think this matters at all ;-)