How to prevent Terminal's character encoding from changing

I have a command-line script that runs continuously, and occasionally echos to STDOUT some binary data that, apparently, changes the way Terminal displays certain characters. Is there any way of preventing this from happening? Say, by locking down Terminal's character-encoding?
...Rene

Rene,
I am not sure if you can prevent this thing from happening but you can set things back to normal by using the reset.
Another possible solution is to write the output of STDOUT to a file so that it will not be displayed on screen.
Mihalis.

Similar Messages

  • How to prevent a text in script from displaying if its value is zero

    Dear all,
    How to prevent a text in script from displaying if its value is zero
    for eg   Price  = 0.00
    if price is 0 it should'nt appear in output.
    I tried with    if price ne 0.
                       price = &price&
                        endif.
    but it's not working.
    Regards
    Raj
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Jan 20, 2009 8:59 AM

    Hello Nagaraju,
                           What you were doing is partially right.
    The correct format to write in the script is as follows :
    /:  if &PRICE& ne 0.
      &PRICE&
    /:  endif.
    This should work. Let me know how it goes.
    Nayan

  • HT1338 trying to download mountain lion OS, but whenever the net connection is broken it restarts from zero, how to prevent this and start downloading from the point it was disconnected

    trying to download mountain lion OS, but whenever the net connection is broken it restarts from zero, how to prevent this and start downloading from the point it was disconnected

    Disable anti virus software and try turning off the Firewall in System Preferences > Security & Privacy > Firewall.
    Quit then relaunch the App Store. From the menu bar click Store > Sign In
    Then click Store > Check for Unfinished Downloads

  • Character Encoding is changing random

    Hello,
    For a short while I'm having the next problem:
    When I am using FireFox, after a while characters on pages are showed as 'boxes'. With setting backView -> Character Encoding to ISO-8859-1 the characters are shown correctly again.
    I do not understand why the character encoding is changing random to UTF-8, while I have selected the ISO-8859-1 and set automatically recognize to false.
    In the options menu I have also set default 'ISO-8859-1' as default character encoding.
    Hoping someone can tell me why it random changes and why the same page can be show correctly for 10 times, but the 11th time the character set has changed? And of course how can I solve this problem.

    I do know a website can determine the character encoding, but the strange part of the problem I occur is that the same page can be shown 10 times correctly, but an 11th time the characters like é and ë, are shown as 'blocks'/'questionmarks'.
    Is there an explanation for that behaviour?

  • How do I stop my original photo from changing after I edit then save it in Raw 7

    How do I stop my original image from changing after I save the edited version in Camera Raw 7. I want to be able to keep the original intact and
    also have the edited version. Also, if I want to work the new edited version in the future I would want to also keep that old version.
    Thanks for your help

    Thanks for this great solution NoelHave a great day and weekend
    Re: How do I stop my original photo from changing after I edit then save it in Raw 7created by Noel Carboni in Photoshop General Discussion - View the full discussion Another way to revert all the saved metadata changes back to defaults is to select the Camera Raw Defaults entry in the Camera Raw fly-out menu... http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-6070597-543394/362-482/RevertS ettings.png  -Noel

  • How can I restore the character viewer?* Changing options in Language/KeyboardPref does not help

    How can I restore the character viewer?* Changing options in Language/Keyboard Pref does not help...

    Tom may be refering to these..
    /Users/YourUserName/Library/Preferences/ByHost/com.apple.HIToolbox.12digit Hex#.plist
    /Users/YourUserName/Library/Preferences/com.apple.CharacterPaletteIM.plist
    /Users/YourUserName/Library/Preferences/com.apple.CharacterPicker.plist

  • How do I keep the page format from changing on my IPAD as I switch between pages

    How do I keep my page format from changing on my IPAD as I switch from page to page.

    Can you provide more information. Switching from page to page in what app? How if the format changing?

  • How can I tell what character encoding is sent from the browser?

    Hi,
    I am developing a servlet which supposed to be used to send and receive message
    in multiple character set. However, I read from the previous postings that each
    Weblogic Server can only support one input character encoding. Is that true?
    And do you have any suggestions on how I can do what I want. For example, I
    have a HTML form for people to post any comments (they may post in any characterset,
    like ShiftJIS, Big5, Gb, etc). I need to know what character encoding they are
    using before I can read that correctly in the servlet and save in the database.

    From what I understand (I haven't used it yet) 6.1 supports the 2.3
    servlet spec. That should have a method to set the encoding.
    Otherwise, I don't think you can support multiple encodings in one
    instance of WebLogic.
    From what I know browsers don't give any indication at all about what
    encoding they're using. I've read some chatter about the HTTP spec
    being changed so it's always UTF-8, but that's a Some Day(TM) kind of
    thing, so you're stuck with all the stuff out there now which doesn't do
    everything in UTF-8.
    Sorry for the bad news, but if it makes you feel any better I've felt
    your pain. Oh, and trying to process multipart/form-data (file upload)
    forms is even worse and from what I've seen the API that people talk
    about on these newsgroups assumes everything is ISO-8859-1.
    Emmy Lau wrote:
    >
    Hi,
    I am developing a servlet which supposed to be used to send and receive message
    in multiple character set. However, I read from the previous postings that each
    Weblogic Server can only support one input character encoding. Is that true?
    And do you have any suggestions on how I can do what I want. For example, I
    have a HTML form for people to post any comments (they may post in any characterset,
    like ShiftJIS, Big5, Gb, etc). I need to know what character encoding they are
    using before I can read that correctly in the servlet and save in the database.

  • Detecting character encoding from BLOB stream... (PLSQL)

    I'am looking for a procedure/function which can return me the character encoding of a "text/xml/csv/slk" file stored in BLOB..
    For example...
    I have 4 files in different encodings (UTF8, Utf8BOM, ISO8859_2, Windows1252)...
    With java I'can simply detect the character encoding with JuniversalCharDet (http://code.google.com/p/juniversalchardet/)...
    thank you

    Solved...
    On my local PC I have installed Java 1.5.0_00 (because on DB is 1.5.0_10)...
    With Jdeveloper I have recompiled source code from:
    http://juniversalchardet.googlecode.com/svn/trunk/src/org/mozilla/universalchardet
    http://code.google.com/p/juniversalchardet/
    After that I have made a JAR file and uploaded it with loadjava to my database...
    C:\>loadjava -grant r_inis_prod -force -schema insurance2 -verbose -thin -user username/password@ip:port:sid chardet.jarAfter that I have done a java procedure and PLSQL wrapper example below:
       public static String verifyEncoding(BLOB p_blob) {
           if (p_blob == null) return "-1";
           try
            InputStream is = new BufferedInputStream(p_blob.getBinaryStream());
            UniversalDetector detector = new UniversalDetector(null);
            byte[] buf = new byte[p_blob.getChunkSize()];
            int nread;
            while ((nread = is.read(buf)) > 0 && !detector.isDone()) {
                detector.handleData(buf, 0, nread);
            detector.dataEnd();
            is.close();
           return detector.getDetectedCharset();
           catch(Exception ex) {
               return "-2";
       }as you can see I used -2 for exception and -1 if input blob is null.
    then i have made a PLSQL procedure:
    function f_preveri_encoding(p_blob in blob) return varchar2 is
    language Java name 'Zip.Zip.verifyEncoding(oracle.sql.BLOB) return java.lang.String';After that I have uploaded 2 different txt files in my blob field.. (first one is encoded with UTF-8, second one with WINDOWS-1252)..
    example how to call:
    declare
       l_blob blob;
       l_encoding varchar2(100);
    begin
    select vsebina into l_blob from dok_vsebina_dokumenta_blob where id = 401587359 ;
    l_encoding := zip_util.f_preveri_encoding(l_blob);
    if l_encoding = 'UTF-8' then
       dbms_output.put_line('file is encoded with UTF-8');
    elsif l_encoding = 'WINDOWS-1252' then
       dbms_output.put_line('file is encoded with WINDOWS-1252');
    else
        dbms_output.put_line('other enc...');
    end if;
    end;Now I can get encoding from blob and convert it to database encoding and store datas in CLOB field..
    Here you have a chardet.jar file if you need this functionality..
    https://docs.google.com/open?id=0B6Z9wNTXyUEeVEk3VGh2cDRYTzg
    Edited by: peterv6i.blogspot.com on Nov 29, 2012 1:34 PM
    Edited by: peterv6i.blogspot.com on Nov 29, 2012 1:34 PM
    Edited by: peterv6i.blogspot.com on Nov 29, 2012 1:38 PM

  • Wrong character encoding from flash to mysql

    Hi, im experiencing problems with character encoding not
    functioning correctly when sending from flash to mysql. What i am
    doing is doing a contact form in flash which then sends the value
    to a php file which takes the values and inserts them into a table.
    As i'm using icelandic charecters i need the char encoding to be
    either latin1 or utf8 in mysql, or at least i think so. But it
    seems that flash or the php document isn't sending in the same
    format as i have selected in mysql because all special icelandic
    characters come scrambled in the mysql table. Firefox tells me
    tough that the html document containing the flash movie is using
    utf-8.

    I don't know anything about Icelandic characters, but Flash
    generally really likes UTF-8. So it should be sending that if that
    is what it is starting with.
    You aren't using any kind of useCodePage? That will mess it
    up.
    Are you sure that the input method is Icelandic?
    In the testing environment can you list variables (from the
    debug menu) and see if they look proper? If they do then Flash is
    readying them correctly and the problem must be coming in further
    down stream.

  • How to prevent IPV6 entries in DNS from server End

    Hello,
    My concern is to stop the IPV6 DNS entries being added to the DNS , but the main goal is to prevent it from the server end instead of going and disabling the IPV6 entries on each client machine.
    I have gone through this article but my goal is to fix it from the server end
    http://social.technet.microsoft.com/Forums/en-US/cd1a87f0-caf3-498e-9a20-e728e474b626/how-to-prevent-ipv6-addresses-from-being-registered-in-dns-server?forum=winserverDS
    Looking forward for the reply.
    Muhammad Asif Server Administrator Linux/Windows

    Hi,
    You can use Group Policy to disable IPV6 on clients within your domain, assuming you have an Acgive Directory environment.
    There are ADM/ADMX templates that are actually doing this. You just have to import it on PolicyDefinition folder on one of your domain controller then configure a group opliy and link it to your structure.
    http://social.technet.microsoft.com/wiki/contents/articles/5927.how-to-disable-ipv6-through-group-policy.aspx
    Hope this help.
    Regards,
    Calin

  • How can I prevent the active Tab Group from changing whenever I close a tab?

    Simply, often I will close a tab in Firefox 4; then, for some reason the active Tab Group changes to some other collection. It usually happens when I close the last tab in my tabs bar, but it has happened after closing other tabs, as well. Would love to prevent Tab Groups from changing automatically. Thank you!

    Hi:
    I tried precisely your suggestion before posting my message to the forum yesterday. I just forgot to mention it... Maybe I was afraid of increasing my message length more and more...
    I already know that this solution prevents the MediaTracker from blocking. However...
    (1) If they reach a troublesome image (like a Targa), the users of my application might not be pleased by its freezing for 10 seconds. Actually, this image loading module is part of an architecture for database applications from which my development team and I produce applications for various customers. Images are used, in particular, in Oracle BLOB support.
    (2) If I use a smaller timeout delay, I have no guarantee that any image, whatever its length, will load properly (Targa excluded, of course). According to tests I performed yesterday, I am virtually sure that the 10-second delay will be busted very easily by pictures larger than 1 Mb. I cannot overlook this potential problem: an Oracle BLOB can contain up to 2 terabytes of data!
    On the other side, I don't want to focus too much the attention on the JIMI Targa import filter because I know that a revised version of the JIMI and JAI packages will be part of JDK 1.4. This is why I am trying to figure out what is happening in the MediaTracker and Toolkit classes, which are much more fundamental than the Jimi ones...
    Thanks anyway...
    Best regards,
    Jean-Fran�ois Morin

  • How do I lock columns or rows from change

    I want to keep a couple of columns from changing.
    This is to prevent inadvertent changes in passwords or user Id.
    How do i do that.

    Waterdoc,
    Numbers allows you to lock a whole table but individual cells.  This means that it is best to design, upfront, your data so that user input data is in one table and calculations are in other tables (which you can lock).  There is no facility for login access by user.  There is the ability to lock a document using the document inspector:
    See the last section.  This is single password for the whole document.
    You can post suggestions to Apple directly using the menu item "Numbers > Provide Numbers Feedback"
    Best regards,
    Wayne

  • How to make the Business Area field from Change Mod to Display Mode in AS02

    Hi Gurus,
    I created a Customized T-code   YAS02   for making the Business Area in Display mode with the help of SHD0.
    But my client wants to do the same in standard T-code of AS02 and they don't like to use the customized T-code.
    Kindly advise to make the Business Area from Change Mode to Display Mode in AS02.
    Thanks in advance...
    regs / Devi Aparna

    Hi Devi,
    check the following customization
    asset accounting -> Integration with the General Ledger> Additional Account Assignment Objects-> Activate Account Assignment Objects---
    Regards,
    Ranjith

  • How can I prevent the settings on iMessage from changing each time I sync the devices with iTunes on our iMac?

    Each time I sync an apple device (iPad, iPad mini, iPhone) with iTunes on our iMac the settings on iMessage and phone settings change. We use the same Apple ID and have different e-mail addresses and phone numbers; however, each time a device is sync'd on iTunes on our iMac, the iMessage settings and phone settings are changed so that we all each get each other's text messages and phone calls. After the device is sync'd/charged, I have to go into each device (all of them somehow update when only one is sync'ing) and re-set the settings to what we want. How can I prevent settings from being changed each time?

    Okay I've tried safe mode.  Let it run down to 98%, plugged it in, locked the screen, and waited.  A few minutes later, the screen came on showing the 100% icon at the top right, full battery icon just to the left of the time, 100% text to the left of that.
    I'm not going to do a hard reset until I have confirmation that this is not normal behavior for the phone because that's going to take hours of my time and gigabytes of data transfer to get all of my media and apps back on the phone and configured.
    After all my griping, I do have to give credit where it's due.  This phone is much more efficient than my Galaxy Nexus.  I left the S5 running in WiFi hotspot mode while on battery last night.  It still had over 50% left on the battery.  The Galaxy Nexus would be stone dead after about 4 hours.  I can live with that if I have to but I'd really rather be able to leave it on the charger at night.

Maybe you are looking for

  • Can I get rid of all the passwords in my phone, and just turn it on?

    Can I get rid of all the passwords in my phone, and just turn it on?

  • Yoga 2 Pro Rocks... Just another reason...

    This machine boots from being off in about 3-4 seconds, same amount of time it takes my Chromebook. I still can't get used to it.  In fact, most times if I've done a reset, I have to actually check if it actually rebooted. Not sure if this is due to

  • How can i load a specific CSS style sheet for Safari?

    Okay, So I have some structure issues when viewing my website on Safari compared to Firefox. Is there a way to put a code in the <head> tag to load a specific CSS style sheet for Safari like you can do with IE? Thanks.

  • Business Benifits acheived

    Hello, can you all gurus refer to some pointers or few presentations explaining the business benifits acheived by using SAP BI? Also some typical advantages/disadv. in case of SAP BI? thanks,

  • Disable ibus in specific programs

    Is there a way to stop ibus from working in specific programs?  If I use a program like eclipse, and try Control-Space to auto-complete, ibus input gets enabled instead, and I have to close ibus.  I know I could just remap it to a shortcut that won't