Author Topic: Weird characters in Build window  (Read 22989 times)

guard001

  • Community Member
  • Posts: 6
  • Hero Points: 1
Weird characters in Build window
« on: July 07, 2006, 11:32:49 PM »
Hi all,

I'm using SlickEdit v11 on Ubuntu Breezy.  Whenever I compile a program that has erros, I see strange characters in the Build window, something like:

ex3_5_mileage2.cpp: In function ‘int main(int, char**)’:

I've tried using different fonts to no avail.  Is there a solution to this?  Thanks,

JIG

guard001

  • Community Member
  • Posts: 6
  • Hero Points: 1
Re: Weird characters in Build window
« Reply #1 on: July 11, 2006, 12:52:31 AM »
Anybody out there?

jbezem

  • Community Member
  • Posts: 87
  • Hero Points: 8
Re: Weird characters in Build window
« Reply #2 on: July 11, 2006, 07:11:18 AM »
Yes, we may not be many yet, but SlickEdit has just started advertising this forum, so try to be patient.
Can you perform a build outside of SE and capture the output in a file? It looks like your compiler is using a specific set of quoting characters. Maybe the codepage used is not automatically configured for the VS build window. Does it look the same when executed from a DOS box?

FWIW,

Johan Bezem
www.bezem.de
« Last Edit: July 11, 2006, 07:12:55 AM by jbezem »

guard001

  • Community Member
  • Posts: 6
  • Hero Points: 1
Re: Weird characters in Build window
« Reply #3 on: July 12, 2006, 02:26:34 AM »
Yes, we may not be many yet, but SlickEdit has just started advertising this forum, so try to be patient.
Can you perform a build outside of SE and capture the output in a file? It looks like your compiler is using a specific set of quoting characters. Maybe the codepage used is not automatically configured for the VS build window. Does it look the same when executed from a DOS box?

FWIW,

Johan Bezem
www.bezem.de

Thanks for the suggestion, Johan, but I tried to compile the same program from a terminal window and the output comes out fine.  This is what I get on a term window:

ex4_2_instr3.cpp: In function ‘int main(int, char**)’:
ex4_2_instr3.cpp:14: error: ‘strong’ was not declared in this scope
ex4_2_instr3.cpp:14: error: expected `;' before ‘dessert’
ex4_2_instr3.cpp:19: error: ‘dessert’ was not declared in this scope

... and this is what I get from the Build window in SE:

ex4_2_instr3.cpp: In function ‘int main(int, char**)’:
ex4_2_instr3.cpp:14: error: ‘strong’ was not declared in this scope
ex4_2_instr3.cpp:14: error: expected `;' before ‘dessert’
ex4_2_instr3.cpp:19: error: ‘dessert’ was not declared in this scope

Therefore I think the problem is in SlickEdit.  Maybe some configuration setting I need to make that I haven't.  I am new to SE, so I wouldn't be surprised.  Any suggestions?

JIG

jbezem

  • Community Member
  • Posts: 87
  • Hero Points: 8
Re: Weird characters in Build window
« Reply #4 on: July 12, 2006, 11:55:09 AM »
OK, I do not offhand know how to change the character encoding for the build window. But the quotes your compiler presents are different from the normal ASCII (7-bit) quotes normally used. Normally you have double quotes " (0x22) and single quotes ' (0x27).
The quotes you have here are 0x91 (opening) and 0x92 (closing). These get converted.
If I cut an paste your quotes in SE 11.0.1, I get the correct quotes.
Please check the following:
- Menu Tools -> Options -> File Options; Tab 'Load', item 'Encoding'. My setting is "Auto Unicode", with setting "Text" I have similar problems.
- Menu Tools -> Options -> File Extension Setup; Tab 'General', item 'Encoding' for Mode name 'Fundamental'. My setting is "Automatic".

If experimenting around these settings don't solve your problems, report back and we'll take it from there.

HTH,

Johan

guard001

  • Community Member
  • Posts: 6
  • Hero Points: 1
Re: Weird characters in Build window
« Reply #5 on: July 13, 2006, 01:27:52 AM »
Please check the following:
- Menu Tools -> Options -> File Options; Tab 'Load', item 'Encoding'. My setting is "Auto Unicode", with setting "Text" I have similar problems.
- Menu Tools -> Options -> File Extension Setup; Tab 'General', item 'Encoding' for Mode name 'Fundamental'. My setting is "Automatic".

No luck.
- Menu Tools -> Options -> File Options; Tab 'Load', item 'Encoding'. My setting is "Latin 9 (ISO-8859-15)".  I tried setting it to "Auto Unicode" like you have it, but I still get those weird characters.
- Menu Tools -> Options -> File Extension Setup; Tab 'General', item 'Encoding' for Mode name 'Fundamental'. My setting is also "Automatic".

What else do you suggest?

JIG

jbezem

  • Community Member
  • Posts: 87
  • Hero Points: 8
Re: Weird characters in Build window
« Reply #6 on: July 13, 2006, 04:31:47 AM »
Can you have a look what the language settings used by your Ubuntu installation are, and match those in your SlickEdit settings? I assume that the code page used for your installation is different from the SlickEdit settings. Latin-9 defines 0x91/0x92 as 'Private Use 1/2', in your installation apparently used for a different set of quotes.
From my quick research, your compiler might - incorrectly - assume the Windows-1250 codepage (cf. http://en.wikipedia.org/wiki/Windows-1250).
Can you try that one (either/both settings, and to be certain, restart SE after changing the setting, to make sure the settings take hold for the Build window)?

HTH,

Johan

jbezem

  • Community Member
  • Posts: 87
  • Hero Points: 8
Re: Weird characters in Build window
« Reply #7 on: July 13, 2006, 04:50:18 AM »
You might also try ISO-8859-1 or Windows-1252.

Johan

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: Weird characters in Build window
« Reply #8 on: July 14, 2006, 02:51:58 PM »
The "Weird characters" are actually UTF-8.  This work around should go in our FAQ.  Here's the best work around at the moment:

edit your ~/.tcshrc file and add the following line:

    setenv LANG en_"US"

If you are using a different shell, you'll need to edit it's startup file.   I tried setting LANG in "vslick.ini" but the shells I tested seem to replace my setting when they start.  The good news is that this shouldn't effect your terminal sessions because they use bash!

This is a common problem now a Linux because the default encoding is usually UTF-8 and currently SlickEdit does not honor this.  SlickEdit uses Xft under Linux and most of the fixed fonts do not have these weird quote characters available.  I know because I tried setting the build window to UTF-8 and it took a TOO LONG to find a fixed font with these quote characters.  SlickEdit's default Unicode font has them but it is a proportional font which most users won't like for their build output.


guard001

  • Community Member
  • Posts: 6
  • Hero Points: 1
Re: Weird characters in Build window
« Reply #9 on: July 15, 2006, 02:31:42 AM »
The "Weird characters" are actually UTF-8.  This work around should go in our FAQ.  Here's the best work around at the moment:

edit your ~/.tcshrc file and add the following line:

    setenv LANG en_"US"

If you are using a different shell, you'll need to edit it's startup file.   I tried setting LANG in "vslick.ini" but the shells I tested seem to replace my setting when they start.  The good news is that this shouldn't effect your terminal sessions because they use bash!


I tried running
Code: [Select]
export LANG=en_US && /opt/slickedit/bin/vs and I don't get the "weird characters", but I get some beeps when building and after it is done my prompt line in the build window looks something like this:

]0;guard007@bigdora2: ~/src/Prata/ex4_3_lastfirstguard007@bigdora2:~/src/Prata/ex4_3_lastfirst$

Notice I seem to be getting two prompts "stuck together."  I asume the beeps are beep character codes.  I don't think it has anything to do with setting LANG right before the command instead of in my ~/.bashrc, but could that be it?  If not what is it?

JIG

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6823
  • Hero Points: 526
Re: Weird characters in Build window
« Reply #10 on: July 17, 2006, 03:50:02 PM »
I'm not getting two prompts stuck together.  Something is sending Ctrl+G characters (character code 7) to the build window.  I have been unable to get sound working on any of my machines (3 machines). So I am unable to correctly test the beep problem.  This could be the "prompt" variable setting of your shell.  Try changing it. 
   set prompt="newprompt%"

The above works for tcsh.  Also, your build program could also be outputing the beep character.  Note that SlickEdit does have a "beep after completion" option (off by default- project properties/Tools tab/ pick tool).

guard001

  • Community Member
  • Posts: 6
  • Hero Points: 1
Re: Weird characters in Build window
« Reply #11 on: August 02, 2006, 04:19:56 AM »
I don't like to leave loose ends, so I'm posting to let you all know I finally solved this problem.  It turned out to be a conflict (I can't explain it any other way) with the en_US.UTF-8 language setting in Ubuntu.  So I reconfigured my system to use en_US.ISO-8859-1 instead.  For some reason, which I do not know, setting LANG=en_US as I explained earlier produced that "double prompt" I mentioned, but reconfiguring the system globally solved it without breaking anything else.  Anyway, thanks all for your help. ;D

JIG.

adavies25

  • Guest
Re: Weird characters in Build window
« Reply #12 on: March 11, 2008, 12:51:44 AM »
Hi all,

I didn't have much luck with the suggestions above. I'm running CentOS 5 with SE version 12.0.3. My weird characters were tick marks from the output of gcc. The LANG env variable inside of the shell window would always default to en_US.UTF8 where as in my .bashrc it would be export LANG="en_US".

I did however fix my problem so I thought I would post here.
I edited my $HOME/.slickedit/<version>/vslick.ini file and added:
LC_CTYPE="en_US"

This changed the character trash in my output window back into real tick marks. Yee ha! ;D

IkerAriz

  • Senior Community Member
  • Posts: 159
  • Hero Points: 6
Re: Weird characters in Build window
« Reply #13 on: July 03, 2008, 03:50:43 PM »
Editing my .bashrc to detect if VSE is the parent process has
worked well for me.  Just add the following to the end of your
bashrc file.

   PARENT=`cat /proc/${PPID}/cmdline`
   PARENT=`basename ${PARENT}`

   if [ "${PARENT}" = "vs" ]; then
      export PS1='>'
      export LANG=en_US
   fi

Regards,
Iker



Robert Hall

  • Community Member
  • Posts: 33
  • Hero Points: 3
Re: Weird characters in Build window
« Reply #14 on: April 23, 2009, 07:17:58 PM »

I did however fix my problem so I thought I would post here.
I edited my $HOME/.slickedit/<version>/vslick.ini file and added:
LC_CTYPE="en_US"

This changed the character trash in my output window back into real tick marks. Yee ha! ;D


I used this as well, thank you! But I now find my vslick.ini file in the slickedit/bin directory.