apostrophes changes when I copy and paste - text

When I cut and paste apostrophes between programs (ie. notepad2, notepad++, hiedisql, word, etc etc) and wysiwyg's, and source codes my apostrophe is changing a little. It looks different and it behaves differently depending on the copy source and paste source.
Is this normal? Is there any way to make sure everything renders the apostrophe the same way? is this a windows thing?
I feel like this is a new thing, but maybe it has always been like this.

Do you mean that ’ -- should look like: -- turns into ' ??
If so, your editor program is "helpfully" changing a non-Ascii right apostrophe into the only apostrophe available in Ascii, the "straight" apostrophe: ' (Or vice-versa.)
The right and left apostrophes are defined in Unicode and ISO 8859 character sets, but not Ascii.
Solution Check the docs for your editors to see if you can turn off the behavior. It may not be possible depending on the specific editing software and its version.
Added Even this editor in Stack Overflow caused me some problems: I entered the Unicode right apostrophe, and it looked fine in the editor. But the preview window (and the display of my answer) shows the apostrophe as being a "straight" apostrophe: it appears that the font used by Chrome for displaying and previewing the answer shows a straight apostrophe instead of a right one. So I added a graphic for the right apostrophe.
Blog post about the problem
For writing software, SQL, etc, you should stick to the straight apostrophe. Editors should not convert the straight apostrophe to the right apostrophe. The issues of single quotes (apostrophes) and straight quotes vs opening and closing quotes is a primary difference between a document editor and a code (software) editor. If your editor changes apostrophes and quotes for you, it can cause a lot of problems in your software. You can usually turn off the behavior of "smart quotes" or similar.

Related

How to display Japanese characters in VBA editor?

I can't set Sheet.Name property in Japanese. Event file name also displays in maybe Chinese? All display well in Excel.
How can I set up the VBA editor to work with Japanese?
I changed region to Japanese.
Finally, I got to the right point.
this post is in Japanese but by picture so not hard to see that in Admitration we must uncheck [Header: World Wide language support ... use Unicode UTF-8]
maybe as #stifin mentioned, it is about wide character.
Answer

Special characters on MFC dialog form

I can see special characters ąęį when I do form design on static text label:
These character are changed while running:
If I set these characters in programming way I have:
How can I ensure that the correct characters are displayed instead of question marks as shown in the screenshot above?
UPD:
My project is Multi-Byte. I found that in another computer I can see special characters. Why?
You need to use Unicode character set for this to work correctly, and my guess is that you're using MBCS character set now.
You could change it in the project properties. Refer to this screenshot:
Visual studio editor is fully Unicode, meaning it could display such special characters as you type when you're designing the dialog. However, if your application is not built with Unicode support, it won't be able to display thsoe characters when it runs. Thich is why you see the ??? replacing the Unicode text when you run the application.
If you get different results on different computers this is obviously due to differences in system settings.
The setting that controls this is called "Language for non-Unicode programs", and can be found under Control Panel, Language, Change date, time or number formats. Unfortunately it's a global setting (ie cannot be set per application or programmatically) and requires a re-boot.
Consider making your application Unicode, if possible (and meaningful cost- or effort-wise).

Dreamweaver CS6 Auto-Closing apostrophe issue

Just upgraded from Dreamweaver CS5.5 to Dreamweaver CS6, and this is a little thing, but its really starting to grate:
In CS5.5 whenever I opened apostrophes, it would auto-complete the closing apostrophe. Then whilst typing if I typed the closing apostrophe it would just skip past the auto-completed closing apostrophe.
eg: class="page"| <--being the cursor
In CS6 however, when I type to the closing apostrophe it adds another apostrophe without skipping past the auto-completed closing apostrophe.
eg: class="page"|" <-- the exact same sequence of keys typed as above, but results in this.
Is there any way to get CS6 mimicking the same behaviour as CS5.5?
Yeah this is possible, but I'm not using my windows machine right now (I'm in linux).
I'll go back home and follow up immediately, but to the best of my memory the options are in
Edit -> Preferences
After that I think it was in "Code Hints"
One of the options there has the solution to your problem.
Note on Dell/ASUS Machines
Dell and ASUS sometimes implement this 'feature' where if you press ", it gets autocompleted. This interferes with dreamweaver. Then the only solution is to simply turn off code hints.. sorry.. :(

How to write superscript / upper index in Visual Studio?

It is possible, but I don't know how is it done.
Use the Windows Charmap.exe applet. In the Font combobox select a font that has a lot of glyphs, Arial Unicode MS is a very good choice. Tick the Advanced view checkbox and type "super" in the Search box. The grid will show all superscript glyphs, select and copy from that and paste into your source code.
Or copy/paste one of these: ¹²³⁴⁵⁶⁷⁸⁹⁰
Subscript characters: ₀₁₂₃₄₅₆₇₈₉
Adding more details to complement #HansPassant's answer. Other frequently used sets which can be used as is by copy/paste:
Superscript small case letters: ᵃᵇᶜᵈᵉᶠᵍʰⁱʲᵏˡᵐⁿᵒᵖʳˢᵗᵘᵛʷˣʸᶻ
Subscript small case letters: ₐ ₑ ₕ ᵢ ⱼ ₖ ₗ ₘ ₙ ₒ ₚ ᵣ ₛ ₜ ᵤ ᵥ ₓ
If you're wondering why few letters are missing in above series then please read below posts:
Where are the other letters in this Unicode block?
Why does the unicode Superscripts and Subscripts block not contain simple sequences of all letters?
Why is there no character for "superscript q" in Unicode?
Since there is a tag visual-studio-2012, I assume you are running Windows. There is a great opensource program called WinCompose, which allows to use easy-to-remember and intuitive shortcuts for a huge amount of Unicode symbols, including numerical super- and subscripts. Every shortcut is invoked via a Meta key (e.g. Right Alt), for example:
Meta + ^ + 1 gives ¹;
Meta + _ + 9 gives ₉.
WinCompose also supports search, can be run in background, and eliminates tedious procedure of calling Character Map with subsequent copy-pasting or remembering the Unicode charsets (but the latter are also listed):
P. S. I'm not affiliated with this software by any means. Just a happy user.
One more way for WPF users,
<TextBlock >
<Run>x</Run>
<Run FontSize="8" BaselineAlignment="TextTop" >2</Run>
</TextBlock>
Change BaselineAlignment to TextBottom if you want to use as subscript.
In VsCode download the extension "Fast Unicode Math Characters".
The hotkeys for ₂ is \_2.
The hotkeys for ² is \^2.
Looks like there are some simple tags that you can use to make any text superscript/subscript. The superscript tag is <sup> and the subscript tag is <sub>.
https://www.w3schools.com/tags/tag_sup.asp
use (Ctrl + Shift + P) command to apply superscript and subscript in Visual Studio.
This is how usually I tend to do it on Mac.
In the VS code, hit (Control + Command + Space) to bring up the Character selector and search for 'superscript' in the search box.
Click on required superscript and add it. And here is the result. Screenshot are from the VS code only.
This approach should work across most of the apps in the Mac. Tested in MacOS 12.5. (Monterey)
There are several solutions. Personally, I simply formaat the label text in Word, use a screen capture and save it as an image that I use with a label.

Automatic HTML escape sequences conversion from Design View to Code View

I have been searching on the web unsuccessfully for a Dreamweaver facility I know exists, and it's quite useful.
In Code View, for typing characters like "ç", we type &ccedil ; as the best practice. What I would like to know is how to be able to type a word that contains the character "ç" in the Design View and get it automatically escaped in the Code View, thus without requiring my own intervention to escape it.
Is that option present among the Dreamweaver preferences? I have not found it.
Thanks in advance!
There isn't an option in preferences to do this but Dreamweaver will do it if the Encoding is set to something other than UTF-8 or other encoding option that doesn't natively support the character.
Start a new, blank page and do Modify | Page Properties | Title/Encoding and change whatever is in the Encoding box to "Western European" and then paste the ç character. Switch to code view and you will see the encoded version. If your page is set to UTF-8, you'll see the ç character in both views.

Resources