Home Download Buy Blog Forum Support

How to Copynpaste ″ character from web browser?

How to Copynpaste ″ character from web browser?

Postby MKANET on Tue Oct 15, 2013 10:57 pm

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



...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!
MKANET
 
Posts: 56
Joined: Fri Aug 30, 2013 5:06 pm

Re: How to Copynpaste ″ character from web browser?

Postby GrantSP on Wed Oct 16, 2013 12:56 am

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.
GrantSP
 
Posts: 39
Joined: Sat Aug 31, 2013 5:11 am

Re: How to Copynpaste ″ character from web browser?

Postby shancat on Wed Oct 16, 2013 2:59 am

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.
shancat
 
Posts: 12
Joined: Thu Feb 28, 2013 6:57 am

Re: How to Copynpaste ″ character from web browser?

Postby MKANET on Wed Oct 23, 2013 5:02 pm

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.

http://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. viewtopic.php?f=3&t=14451 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: Select all
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
Last edited by MKANET on Wed Oct 23, 2013 5:59 pm, edited 2 times in total.
MKANET
 
Posts: 56
Joined: Fri Aug 30, 2013 5:06 pm

Re: How to Copynpaste ″ character from web browser?

Postby jbrooksuk on Wed Oct 23, 2013 5:16 pm

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

You can't I'm afraid.
jbrooksuk
 
Posts: 754
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: How to Copynpaste ″ character from web browser?

Postby MKANET on Wed Oct 23, 2013 6:00 pm

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

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

You can't I'm afraid.
MKANET
 
Posts: 56
Joined: Fri Aug 30, 2013 5:06 pm

Re: How to Copynpaste ″ character from web browser?

Postby GrantSP on Wed Oct 23, 2013 11:33 pm

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

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

You can't I'm afraid.


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.
GrantSP
 
Posts: 39
Joined: Sat Aug 31, 2013 5:11 am

Re: How to Copynpaste ″ character from web browser?

Postby edubkendo on Thu Oct 24, 2013 3:59 am

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.
edubkendo
 
Posts: 30
Joined: Fri May 18, 2012 2:43 pm
Location: Nashville


Return to General Discussion

Who is online

Users browsing this forum: JerseyMilker, prmaple and 21 guests