When I type ifconfig, this should show as "wlan1", but it's showing as
wlanx00c0c8476b6:
What in the world is this encoding? How can I check the encoding and reset it if need be? Surely this can't be right!
Related
I have a problem passing special parameters from a bash script to a browser URL bar.
I would like to open a PDF file on a certain page, and with a certain zoom factor, and at a certain position (relative to a page corner, I think that's called "focus") in Brave, from the command line.
I thought that should work like this:
$ brave-browser file:/home/user/foo.pdf#page=5&zoom=150,50,50
(the ",50,50" would be the "focus") but it doesn't. It just provokes an error message.
Copy/pasting the entire line with all the special characters manually to the URL bar works fine, but I would like to do that without the mouse or keyboard, from the CL. In other words, copying the string
file:/home/user/foo.pdf#page=5&zoom=150,50,50
and pasting that straight into the URL bar will open the file the way I want in Brave.
This shortened command works from the CL:
$ brave-browser file:/home/user/foo.pdf#page=5
but adding the &zoom=150,50,50 provokes an error message from Brave.
I just can't get my head around how to format the rest of the line so that the file opens in the browser as intended (zoomed and focussed), when called from the CL.
I begin to wonder if that is possible at all.
I have tried everything that was suggested here:
Shell script to open a URL
and a couple of other ideas I had (mainly, creative use of quotation marks)
I also read this, but I am not sure if it refers to the same question - and the post is 11 years old. Was hoping that things changed:
Can a website pass focus to the browsers url field?
Thanks a lot for any help!
Just found out that all it takes is a backslash in front of the ampersand...
Strange: no matter how I do write that here, with the *** before and after the code, or without the three *** , I can never see the backslash in the post's preview!
browser file:/home/user/foo.pdf#page=5 \ &zoom=150,50,50
I have to type blanks before and after the hash to make it visible in this post as above. Looks wrong but this is the only way I can show what I mean. Also strange: the hash # works without the backslash \
Thanks, should someone have looked into this in the meantime!
Note: I have been redirected to this website, as it believed to be the appropriate option for questions like this. If this is not the correct website, could someone please just let me know where I can find help?
I'm trying to write my program in Pycharm, but for some annoying reason whenever I try to type \, it shows up as ¥.
Here's a screenshot:
this is actually supposed to say print('\n'). Whatever has happened has changed all the \ to ¥ in all my files!
And, yes, I have tried copying and pasting the \ but it just ends up changing into ¥
So, could someone please let me know how to fix this??
This could be happening because you are using a font, particularly a Japanese don't. Change the font to an English font like Arial.
If that doesn't work you can use the Unicode backslash in Unicode and ASCII it is encoded at U+005C
I have a local json file with some descriptions of an app and I have found a weird behaviour when parsing \u0092 and \u0091 characters.
When json file contains these characters, the corresponding parsed NSString is printed like "?" and in UIlabel it dissapears completely.
Example "L\u2019H\u00e9r." is showed as "LHér." instead of "L'Hér."
If I replace this characters with \u2019, then I can see the caracter ' in UILabel
Does anybody any clue about this?
EDIT: For the moment I will substitute both of them with character \u2019, it is also a ' and there is no problem confusing it with a control character. Thank you all!
This answer is a little speculative, but I hope it gets you on the right tracks.
Your best bet may be to give up and substitute \u0091 and \u0092 for something else as a preprocessing step before string display. These are control characters and are unprintable in most encodings. But:
If rest of the file is proper UTF, your json file probably has problems: encoding is wrong (CP-1250?) while you read the file as UTF, some error has been made when converting the file, or a similar issue. So another solution is of course fixing your file.
If you're not sure about how your file is encoded, it may simply be encoded in CP-1250 - so reading the file using NSWindowsCP1250StringEncoding might fix your problem.
BTW, if you hardcode a string #"\u0091", you'll get a compilation time error Universal character name refers to a control character. Yes, not even a warning, it's that much unprintable in Unicode ;)
This only seems to happen in Chrome, but when AJAX is used to send a JSON-encoded string containing é (which itself is typed by entering Alt+0233), it somehow ends up as a tab (character 9) in the database and "consumes" the following character.
I'm no stranger to é being shown instead of é because that's the UTF8-encoded "version" being treated as iso-8559-1, but what could cause 0b11101001 to become 0b00001001?
Although I have not found the reason for the encoding error, I have managed to fix the issue by checking the character encoding of the sent data and re-encoding as necessary.
The character encoding starts to irritate me.
It took me a while to get everything from the DB in the right encoding on the screen, but with help from the i18n helper, this worked out.
Now I only have one more problem: saving text...
If i add some letters with accents (eg é ç ...) in a text field and want to save it, already in my controller it show as some exotic combination of characters.
Could someone tell me why this is and how I can fix this.
Everything is in UTF-8 btw
Thanks!
//Edit:
When I save the form, this is my log output
Parameters: {"free_text"=>"test 1 2 é",
And everything is capable of UTF-8...
Can you illustrate your output?
Let me guess your situation.
Supposed that you log those characters in controller in log/development.log or production.log.
If you view that log in terminal, you should ensure your terminal is capable to show UTF-8, with appropriate font. Also, your shell is capable to show UTF-8 and so do your the text viewer.