Sublime Forum

How to Copynpaste ″ character from web browser?

#1

For some odd reason when I copy and paste code (from any web browser) that has the following character:

[size=200] ″ [/size]

…it gets converted to a weird illegible box character as soon as I paste the code into sublime text. I’ve tried playing with different encodings such as utf-8 with bom, but it doesnt help any. Notepad.exe doesnt seem to have this problem.

All I want to do is copy and paste without having to worry about manually changing encodings or converting characters. I just want to copy and paste from my web browser to sublime text to work seamlessly.

Thanks in advance!

0 Likes

#2

Is that the actual character that is giving you trouble, or is it just some quotes you typed in this post?

If it is the actual character then you may have some other problem greater that font-rendering, since that character displays perfectly fine for me.
On the other hand if you actually encountered a “smart-quote”.
e.g.
“Curly or smart quotes!”
“Regular or dumb quotes.”

It ‘may’ be the case that the font that is set as the default on your system has no glyph for the smart quote and therefore doesn’t display anything except an error glyph.

You could try setting another font in your User-settings and see if that help.
As an example the font Courier doesn’t have the smart-quote glyph and renders it as a small filled rectangle.

0 Likes

#3

Definitely sounds like a font problem. Keep in mind that changing it to UTF (or any encoding for that matter) doesn’t mean that your font supports it. Find out what font Notepad is using and try setting it to that font in ST to see if that changes anything.

0 Likes

#4

Just to be clear, I can copy and paste just fine from my web browsers to sublime text. The problem is if I save the code snippet (I just pasted) to a file, then, try to execute the script, my command-interpreter (powershell, for example) complains about: ‘Out-Host’ (from the code snippet shown below).

The font I’m using for the Windows command-line Powershell is Consolas (one of two available fonts for powershell or windows legacy command interpreter). So, it’s not like I’m using an unusual/unpopular font. My Sublime font also uses an extremely popular Windows font, Lucida Console (which is also one of the 2 compatible fonts meant for Windows command-line).

So, since ALL the code snippets I copy and paste (from any website) are specifically meant for Powershell, what’s causing the problem?

All I want to do is for Powershell to automatically save the text I paste into it into a Windows command-line friendly character set; without the extra hassle of trying to convert charactersets manually. I’m hoping that’s not too much to expect from Sublime Text.

stackoverflow.com/questions/1078 … 71#1083771

EDIT: It looks like the problem is revolved around “smartquote incompatibility”. Im hoping there’s a way for sublime text to know how to handle smartquotes.

I did find a forum post to show how to make a “straight quote” setting for sublime text. Straighten Quotes option? I am successfully able to use the new added Edit menu option “Staighten Quotes” to resolve the issue. Very simple! I have a feeling this is about as automatic as it gets for dealing with these kinds of characters. I’m not sure if there’s a way to have that automatically happen when those characters are detected.

PS: How do make Sublime Forums send me an email when people reply to my posts? I dont see an option like that anywhere.

[code]function more2
{
param(
[Parameter(ValueFromPipeline=$true)]
[System.Management.Automation.PSObject]$InputObject
)

begin
{
$type = [System.Management.Automation.CommandTypes]::Cmdlet
$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(‘Out-Host’, $type)
$scriptCmd = {& $wrappedCmd @PSBoundParameters -Paging }
$steppablePipeline = $scriptCmd.GetSteppablePipeline($myInvocation.CommandOrigin)
$steppablePipeline.Begin($PSCmdlet)
}

process
{
try
{
$steppablePipeline.Process($_)
}
catch
{
break;
}
}

end
{
$steppablePipeline.End()
}

#.ForwardHelpTargetName Out-Host
#.ForwardHelpCategory Cmdlet
}

New-Alias more more2[/code]

0 Likes

#5

You can’t I’m afraid.

0 Likes

#6

Seriously? I belong to over 30 different Internet forums. Ive never seen a forum that doesnt have an email notify feature. Very odd.

[quote=“jbrooksuk”]

You can’t I’m afraid.[/quote]

0 Likes

#7

[quote=“MKANET”]Seriously? I belong to over 30 different Internet forums. Ive never seen a forum that doesnt have an email notify feature. Very odd.

You can’t I’m afraid.[/quote]

I agree it is very strange you can’t get notification of new postings, considering the FAQ says you can!
The FAQ says there is a “Subscribe” option that provides this facility, but for the life of me I can’t see where it is.

0 Likes

#8

There actually used to be one ( a way to get notifications from the Sublime Forum). The administrator chose to disable it. Don’t ask me why, I only know from searching out past posts on the subject when I, also, was trying to figure out why I didn’t get notified about those anymore.

0 Likes