Preloader - Character Encoding on external script files

Hi,
I have found a slight bug in the generated preloader file _edgePreload.js.
Basically when the preloader creates the script elements, it doesnt set the charset attribute which causes issues with foriegn characters in certain browsers including FireFox.
This can be found on line 11 & line 2 of the minifed published version of the  _edgePreload.js file.
var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;
The following should also be included after the code above to fix the problem.
k.type="text/javascript";k.charset="utf-8"
Is this something that can be include in the next update? or is there any other alternate suggests insted of manually having to add this to the _edgePreload.js each time its published.
Thanks,
Nik

Hi Rhemanth.
Thanks for your quick respons. Correct me if im wrong - yes yepnope is used to load the scripts however _edgePreload.js file defines what is loaded and what attributes are being set.
For example - to create a stylesheet element the 'rel' & 'type' attribute are being defined correctly.
var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";
However for script elements the nessecary attributes have not been defined in _edgePreload.js and has been left out of the function.
Thanks,
Nik

Similar Messages

  • VS2013 Page Inspector does not use external script files

    If I use an external javascript file, the Page Inspector does not appear to run the javascript (as the styles created during runtime are not visible). If I run the web page outside of VS (e.g. IE) then it works.
    <script type="text/javascript" src="border.js"></script>
    However, if I use an internal script, the styles are created as expected.
    <script type="text/javascript">$("div").css("border", "2px solid red").add("p").css("background", "yellow");</script>
    Is the Page Inspector supposed to use external script files, and if not, are there plans to support it?

    Hi,
    Thank you for your post.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because Page Inspector feature is more related to ASP.NET Application/Technology, in order to resolve your issue better,
    I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/  for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Character encoding in resource bundle files

    I am developing a multilingual site, using resource bundle files. The problem I'm having is that, while the jsp file is save in UTF-8, and the contentType="text/html; charset=UTF-8", the foreign characters in the bundle files don't display properly unless I save them as "windows-1252". If I copy the text and paste it into the jsp file, it displays correctly.
    How can I make the text from the bundle files display the same as the text in the jsp document itself when both files are saved as UTF-8? I'm surprised it doesn't do this by default.

    Because resource bundles (the PropertyResoureceBundle class in particular) doesn't know anything about JSP or HTML page encodings. All that class knows is that it needs to load a properties file from the local (server-side) file system. (BTW, if you are using Struts MessageResources, it works the same way). Anyway, it doesn't read the file every time you call for a resource property String, it reads it 1 time, and 1 time only when you call new ResourceBundle().
    The API docs (in java.util.Properties) specified that properties files are read using the ISO8895-1 encoding, actually, not the Windows-1252 or whatever the OS defines. So if you store text that's using a different encoding then ISO8895-1, it's going to read the chars incorrectly.
    native2ascii converts things to ASCII using Unicode escapes, as I said. (Although, maybe it saves as ISO8895-1, I forget..., or maybe you should specify the output encoding.... you'd have to read the docs on that tool, cuz there's no command-line help.) This is sort-of an exception to the ISO8895-1 thing, in a sense, as all ASCII chars are the same as the first 127 chars of ISO8895-1, so it doesn't matter really.
    So in short, it doesn't assume it's in the default Windows encoding, it assumes it's in ISO8895-1. But since the API docs specifically say so, you should abide by those rules.
    As for "getting around the problem", yes, it does, actually. See, whatever it reads in that Unicode escaped ASCII text is converted properly to Strings in Java, which are 16-bit Unicode characters, which cover nearly every character set around (English, Chinese, Japanese, Arabic, Cyrillic, etc). When it's in that form, the chars are the Unicode chars and that's it. That's all they need to be. Encodings are only important when writing (and reading back) to files or other byte streams. You have to read in with the same encoding it was written under, otherwise the conversion is not going to be correct (with a few exceptions, but not many).
    So that creates a Unicode String in Java, and when you write that to a JSP page or servlet, the output writer used knows from the content type you specified in the page declaration (UTF-8 is typically recommended because it's an efficent way to deal with Unicode chars, particularly in HTML, where most of the HTML tag content is still ASCII text), so it encodes the strings in that encoding.
    Get it?

  • How to set character encoding to Greek in a javascript file in Dreamweaver CS4?

    I have a javascript file built with a text editor some time
    ago, which has Greek characters in one of the variables:
    1.) --> var
    scrollercontent='</font><br><font face="Verdana"
    color="#333333" size="-1">11-04-2008:
    <b>ΜΑΝΩΛΗΣ
    ΜΗΤΣΙΑΣ
    </b><br><img SRC="mitsias2.gif" height=148 width=104
    border="0" /><p></font>' <--
    In DW CS4 it displays as
    2.) --> var
    scrollercontent='</font><br><font face="Verdana"
    color="#333333" size="-1">11-04-2008: <b>???O??S ???S??S
    </b><br><img SRC="mitsias2.gif" height=148 width=104
    border="0" /><p></font>' <--
    When trying to save the corrected content in 1.) I get an
    error message that DW cannot save the Greek characters. I am asked
    to change the character encoding.
    I don't know how to change the character encoding in a js
    file. Is there a "head" file like in HTML? Or how does one
    determine the character encoding in a js file?
    When I change the encoding in the prefereces, which is
    "Western" to "Greek" or "UTF", I have the same result.
    Thanks for help.
    jml

    The .js file and the html need to have the same encoding. If
    your html uses iso-8859-7, then the .js must also use that. But if
    the original text editor created the .js file using utf-8, then
    that is what the html needs to use.

  • How to Eliminate Special Character in SQL LOADER Script

    How to eliminate special character from SQL LOADER script file which suppose not to insert in TABLE
    example.CSV lile like this
    <ABC/ , 7747>
    <DEF/ , 7763>
    <NEW/ , 7779>
    <OLD/, 7795>
    I have to remove < > and / character at the time of loading into table. How It could be done. It is not possible to remove < , > , / character manually from CSV file

    On Unix/Linux that's very easy, on Windows... I don't know...
    $ cat myfile.csv
    <ABC/ , 7747>
    <DEF/ , 7763>
    <NEW/ , 7779>
    <OLD/, 7795>
    $ tr -d "\057\074\076" <myfile.csv >outfile.csv
    $ cat outfile.csv
    ABC , 7747
    DEF , 7763
    NEW , 7779
    OLD, 7795
    $

  • Why differing Character Encoding and how to fix it?

    I have PRS-950 and PRS-350 readers, both since 2011.  
    In the last year, I've been getting books with Character Encoding that is not easy to read.  In playing around with my browsers and View -> Encoding menus, I have figured out that it has something to do with the character encoding within the epub files.
    I buy books from several ebook stores and I borrow from the library.
    The problem may be the entire book, but it is usually restricted to a few chapters, with rare occasion where the encoding changes within a chapter.  Usually it is for a whole chapter, not part, and it can be seen in chapters not consecutive to each other.
    It occurs whether the book is downloaded directly to my 950 reader or if I load it to either reader from my computer(s), which are all Mac OS X of several versions fom 10.4 to Mountain Lion.  SInce it happens when the book is downloaded directly, I figure the operating system of my computer is not relevant.
    There are several publishers involved, though Baen (no DRM ebooks) has not so far been one of them.
    If I look at the books with viewers on the computer, the encoding is the same.  I've read them in Calibre, in the Sony Reader App, and in Adobe Digital Editions 2.0.  It's always the same.
    I believe the encoding is inherent to the files.  I would like to fix this if I can to make the books I've purchased, many of them in paper and electronically, more enjoyable to read on my readers.
    Example: I’ve is printed instead of I've.
    ’ for apostrophe
    “ the opening of a quotation,
    â€?  for closing the quotation,
    and I think — is for a hyphen.
    When a sentence had “’m  for " 'm at the beginning of a speech (when the character was slurring his words) it took me a while to figure out how it was supposed to read.
    “’Sides, â€™tis only for a moon.  That ain’t long.â€?
    was in one recent book.
    Translation: " 'Sides, 'tis only for a moon. That ain't long."
    See what I mean? 
    Any ideas?

    Hi
    I wonder if it’s possible to download a free ebook with such issue, in order to make some “tests”.
    Perhaps it’s possible, on free ebooks (without DRM), to add fonts by using softwares like Sigil.

  • Character encoding in Netweaver Developer Studio

    Hi all!
    I've migrated a EP5E Project to P6 and it worked fine. But now I use another workstation and while trying to open a java-file of migrated project I got
    "Error Encoding Problem, this file is unreading using the UTF-8 character encoding".
    The java-file contains german characters like "ä".
    I'm using SAP NetWeaver Developer Studio Version: 2.0.5
    Build id: 200404200353
    Does anyone know, how to set Character Encoding in NetWeaver Developer Studio?
    Thank You

    I've found the solution:
    Changing the encoding used to show the source
    To change the encoding used by the Java editor to display source files:
    With the Java editor open, select Edit > Encoding from the menu bar
    Select an encoding from the menu or select Others and, in the dialog that appears, type in the encoding's name.
    Note: this setting affects only the way the source is presented.
    To change the encoding that the Java editor uses when saving files, specify a text file encoding preference on Window > Preferences > Workbench > Editors.

  • How can I get a preloader to launch a main (external) swf file, and have the main file remove the preloader once it's fully loaded?

    Using Flash MX, ActionScript 2:
    I’ve been struggling for several weeks, trying to get a preloader to work on a large (~80 MB) photo portfolio file (using the method where the preloader is on frame 1 of the file, and when loading is completed, it jumps to the content).  I’ve done countless tutorials, and none seem to work on my presentation.  I even tried downloading a trial version of CS4 so I could export every one of the file’s library movie clips and images so that they load on Frame 2 (a feature MX doesn’t have).  It takes about 20 seconds for the .exe to load from a CD, and no matter which preloader construction I use, it always seems to appear in the last few seconds before the movie loads completely.  During the initial wait time, there’s no indication that anything is happening:  no hourglass on the mouse, and not even a blank screen. This is only true for the first time that the file is loaded from the CD; on subsequent loads, the file must already be in RAM, because it loads within a few seconds. 
    I decided that I’m going to try and make the file which the user clicks on (one named Windows_Portfolio.exe or another called Mac_Portfolio.hqx) the preloader so that it would be tiny, and would load instantly.  I want that file to launch the external huge portfolio file (renamed files.swf), keep track of its loading progress, and cycle through a slideshow (10 thumbnail images that transition into each other over 100 frames) proportionally, based upon the percentage of files.swf that had been loaded.
    I assume that there should be a loadMovie() or a loadMovieNum() command on the preloader’s timeline to launch files.swf, and that the initial code of files.swf should have some sort of this._parent._visible=false or other way of deleting the preloader on level0.  Can anyone explain the steps to me, or direct me to a good Flash MX tutorial that explains how to launch another external swf from a preloader .exe, keep track of its load progress, and delete the preloader .exe once the external swf had been loaded?
    Also, I’ve read that, using this construction on a CD, every file has to be in the same place, and that I can’t nest files.swf in a folder named “files,” and reference it with files/files.swf.  Is this true?
    Thanks for any assistance you can offer.

    If you know JavaScript (ECMA Script) then you might be able to get it done applying a for loop and a random function
    to the for loop if you know how to get a page-loaded request into JavaScript.
    But an easier solution, if you know ActionScript 3.0, and if your SWF's don't need to be recoded and can load into a "container" SWF would be to create a master FLA file that loads your SWF's in a random fashion using Math.random() as a multiplier, though you won't see much variation if you only have 2-3 SWF's to load--if you had more than that then you would begin to benefit from the random function's capabilities.  In ActionScript 3.0 use the load() method along with addChild() to load the SWF and add it to the stage.  You will be able to search for specifics on how to code the FLA properly by using Flash's Adobe Help tool and also using an internet search.
    -markerline
    P.S. Once you have the master FLA coded you can Publish it to an SWF and an HTML and if the container/master SWF needs to be in a page with other content you can simply copy and paste the object and embed tags for the container SWF from the published HTML into any place on your master HTML that you need it to reside.  You can then use CSS to control placement of the SWF object if it is in a div tag.

  • Preloader to also preload external f4v files in main movie?

    n00b alert... I did search the forum (and several others
    online), but either the code got too complicated for me to even
    attempt to adjust it, or I didn't find a relevant answer.
    So I really hope someone here can help me out.
    I've found a preloader code online that works like a charm. I
    don't really know what half of it actually means/does, but it
    preloads and then plays the mainfile.swf . Me happy.
    But the "mainfile.swf" calls external f4v files, and the
    problem is that they do not get preloaded. (And that kinda was why
    I needed a preloader in the first place...)
    I gave all the f4v files instance names within the mainfile
    (assume: video01.f4v, video02.f4v etc), and the f4v files
    themselves are in the same folder as the mainfile.swf.
    What do I need to add to the code to get it to preload
    everything?
    Thanks in advance!!
    ActionScript Code of my preloader is attached.

    You could load each movie using movieClip.loadClip(); and
    check it has been loaded by using a listener and the
    "myListener.onLoadInit" script to write your own function to begin
    the playhead for that movie.

  • Preload External swf files

    I am trying to create a website that has a main swf file that
    loads several external swf files into itself.
    I would like the preloader not only to preload all of the
    "main" content, but also the content that exists inside the
    external swf files before proceeding to the main user interface.
    Any help that you could give, addresses to a tutorial would
    be much appreciated.
    Thanks in advance.

    You could load each movie using movieClip.loadClip(); and
    check it has been loaded by using a listener and the
    "myListener.onLoadInit" script to write your own function to begin
    the playhead for that movie.

  • Add one character at  a time from External Text file

    Hi,
    I'm using Flash 8, and I have created a standard Dynamic
    field that pulls the text from an external text file using the
    LoadVars function and it works fine.
    To get the correct effect for the design, I would like to be
    able to create the illusion that the characters are being typed out
    when the page loads as if someone has started typing and also hear
    the "Typewriter Clack" each time a character appears.
    The only place I have found an example is on the Syphon
    Filter Game website which seems to have created the illusion
    perfectly:
    http://www.syphonfilterdarkmirror-thegame.com/en_IE/
    (Check out the bottom right section)
    I could create a Movieclip and add a character each frame
    but, I would like to be able to edit the text when required via a
    text file or even ASP or PHP if neccessary.
    Any help would be grateful.
    Cheers

    or here:
    http://www.actionscripts.org/tutorials/beginner/Scripted_Typerwriter/index.shtml

  • How to set the system default file character encoding to UTF-8?

    Hi all. This is driving me nuts, on both my Windows box and Snow Leopard; I figure much more chance of finding the answer for OS X.
    My language and locale are set to Australian English. $LANG=en_AU.UTF-8
    However, as I believe is expected, OS X (and Windows for that matter) will create files by default with character encoding of Cp1252 (Latin-1). That is, the FILE encoding in the file metadata - the Byte Order Mark I believe. The file itself, not the characters written to it.
    This, in a word, bites. I don't want to be restricted to only ASCII by default, and it is causing me problems with certain software (a Firefox plugin) that creates text files, passing in UTF-8 encoded content, which is then mangled because the file encoding itself is still Cp1252. (I know, I've tested this by changing the file encoding manually and having it overwritten again by the plugin: works correctly.)
    As a simple example, just `touch somefile` from terminal creates a file in Cp1252 -- I'm obtaining that info by opening in jEdit by the way (anyone know of something better?).
    In other locales that are not English-based, I believe the default file encoding is UTF-8. But surely this can be controlled independently? There must be a system configuration value somewhere that specifies file encoding default. Can someone please tell me what it is?
    Thanks!

    However, as I believe is expected, OS X (and Windows for that matter) will create files by default with character encoding of Cp1252 (Latin-1). That is, the FILE encoding in the file metadata - the Byte Order Mark I believe. The file itself, not the characters written to it.
    Apps like TextEdit and Mail have settings that let you determine the encoding of text produced. The default would normally depend on the character content of the file, ranging from ASCII for basic English to Windows Latin-1 (Win 1252) or ISO Latin -1 (ISO 8859-1) to UTF-8 for other content.
    Win 1252 is not ASCII, but has twice the number of characters in the latter.
    Byte Order Mark is something totally different --it's a particular character used to signal certain encodings.
    http://en.wikipedia.org/wiki/Byteordermark
    As a simple example, just `touch somefile` from terminal creates a file in Cp1252 -- I'm obtaining that info by opening in jEdit by the way (anyone know of something better?).
    For what Terminal does and how to change it, it might best to post in the Unix forum:
    http://discussions.apple.com/forum.jspa?forumID=735
    For problems with a FireFox plugin, it might be good to ask on their own forums as well.

  • Cannot save a file with Windows Latin 1 encoding or Mac OS Roman encoding.  Has anything changed about character encodings, Cannot save a file with Windows Latin 1 encoding or Mac OS Roman encoding.  Has anything changed about character encodings

    Hi everybody,
    I am in France. I have juste installed Lion.  I have to regularly send php files on to a website on a Linux Gentoo under Apache webserver. Up until now I used Smultron (a text and code editor) and saved the files in Mac Os Roman Character encoding.  This does not work anymore and the French accuentated characters are not displayed correctly on the web site. The website is ISO-8859-1.
    I have tried within Smultron but also within TextEdit, to copy and paste a correctly accentuated version of one of the php files and then save it in another encoding but neither apps let me use Mac Os Roman or Windows Latin or even Latin 1, I can only save using UTF8 and I have the following message :
    " This document can no longer be saved using its Western (Iso Latin 1) encoding"
    If I type a small text with accents and save it as a php file in Iso Latin 1, it works, but not the big files with php code within...
    Anybody can help ?  I cannot send links to the web pages because they are password protected.
    Thank You very much

    I find part of your post rather confusing.  MacRoman and ISO-8859-1 are totally different and one would not expect the former to display correctly if viewed as the latter.
    If TextEdit will only save as UTF-8, it seems like your file must have some character in it, perhaps difficult to see, which is not contained in Latin 1.  If you could send me a copy of a file where you have this problem, I could take a look (tom at bluesky dot org).

  • Apple Script For Opening External EML File With Apple Mail

    Hi folks,
    

 I am working with Apple Script for implementing numerous function related to Mail App.
    

I am using the following Apple Script lines for opening the mails which are in Mail app for each modes.
    

View Mode : open theMsg

    Reply View Mode : reply theMsg opening window yes

    Reply All Mode : reply theMsg opening window yes reply to all yes

    Forward Mode : forward theMsg opening window yes



    I want to know how we can open external eml file in different view modes (View, Reply, Reply All and Forward) using Apple Script or Apple Event programmatically with a similar mechanism available through script in Mail App.

    
Thanks in advance.

Regards
    
Nisar

    I'm not sure what you're doing here, but this isn't anything I recognize as compilable applescript. what is this 'mode' thing you're talking about.
    at any rate, if you have a loose emlx file sitting around somewhere you can simply open it in mail (use the 'open' command and the file specification for the emlx file) and work with it appropriately. if you're talking about an actual eml file (e.g. from Outlook Express) you'd have to GUI script Mail's 'import mailbox' command (the applescript handler for importing mail only works with Mail.app mailboxes)

  • Character Encoding and File Encoding issue

    Hi,
    I have a file which has a data encoded using default locale.
    I start jvm in same default locale and try to red the file.
    I took 2 approaches :
    1. Read the file using InputStreamReader() without specifying the encoding, so that default one based on locale will be picked up.
    -- This apprach worked fine.
    -- I also printed system property "file.encoding" which matched with current locales encoding (on unix cooand to get this is "locale charmap").
    2. In this approach, I read the file using InputStream as an array of raw bytes, and passed it to String contructor to convert bytes to String.
    -- The String contained garbled data, meaning encoding failed.
    I tried printing encoding used by JVM using internal class, and "file.encoding" property as well.
    These 2 values do not match, there is weird difference.
    For e.g. for locale ja_JP.eucjp on linux box :
    byte-character uses EUC_JP_LINUX encoding
    file.encoding system property is EUC-JP-LINUX
    To get byte to character encoding, I used following methods (sun.io.*):
    ByteToCharConverter btc = ByteToCharConverter.getDefault();
    System.out.println("BTC uses " + btc.getCharacterEncoding());
    Do you have any idea why is it failing ?
    My understanding was, file encoding and character encoding should always be same by default.
    But, because of this behaviour, I am little perplexed.

    But there's no character encoding set for this operation:baos.write("���".getBytes());

Maybe you are looking for

  • Error code 0xe0ef0003, No "BOOTMGR" after a system restore, no disc/self system.

    So ... my HP Pavilion dv7 NB, that I've owned just a mere two days shy of three years, decided to get extremely lazy late last night. I have malware programs in place, strong security, etc. but I suppose that something might have slipped in ... but u

  • Problem in Partitioning a Table

    Hi, We have a table which we want to partition by the modulo of the week of the year (obtained from CREATE_DATE column) divided by 4. So this table should have four partitions 0, 1, 2 and 3. For example a record inserted in the table on 25th January

  • Using Apple TV With Macbook Closed

    Hi, I have recently bought Apple TV and I know that the device has internal memory that it uses to load its content. My question is, once the content has been "loaded" into the Apple TV, can I then close the lid of my Macbook and start to watch or do

  • PO send in Email requires more attachments

    Hi All, Currently we have configured a message to send the PO to vendor and this process works fine, Now we need to attach some more files in the same email.. Please let me know how to do it and Is there any user exit or BADI for this. regards, Prabh

  • Where do I find the iTunes 10 plugins and how to add one?

    I can't seem to find the iTunes plug-ins in the folder. Where are they and are there any new visualizers for iTunes 10 for Mac?