Search Results

Search found 9400 results on 376 pages for 'special character'.

Page 11/376 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Why do browsers encode special characters differently with ajax requests?

    - by Andrei Oniga
    I have a web application that reads the values of a few input fields (alphanumeric) and constructs a very simple xml that is passes to the server, using jQuery's $.ajax() method. The template for that xml is: <request> <session>[some-string]</session> <space>[some-string]</space> <plot>[some-string]</plot> ... </request> Sending such requests to the server when the inputs contain Finnish diacritical characters (such as ä or ö) raises a problem in terms of character encoding with different browsers. For instance, if I add the word Käyttötarkoitus" in one of the inputs, here's how Chrome and Firefox send EXACTLY the same request to the server: Chrome: <request> <session>{string-hidden}</session> <space>2080874</space> <plot>Käyttötarkoitus</plot> ... </request> FF 12.0: <request> <session>{string-hidden}</session> <space>2080874</space> <plot>Käyttötarkoitus</plot> ... </request> And here is the code fragment that I use to send the requests: $.ajax({ type: "POST", url: url, dataType: 'xml;charset=UTF-8', data: xml, success: function(xml) { // }, error: function(jqXHR, textStatus, errorThrown) { // } }); Why do I get different encodings and how do I get rid of this difference? I need to fix this problem because it's causing other on the server-side.

    Read the article

  • How to strip out 0x0a special char from utf8 file using c# and keep file as utf8?

    - by user1013388
    The following is a line from a UTF-8 file from which I am trying to remove the special char (0X0A), which shows up as a black diamond with a question mark below: 2464577 ????? True s6620178 Unspecified <1?1009-672 This is generated when SSIS reads a SQL table then writes out, using a flat file mgr set to code page 65001. When I open the file up in Notepad++, displays as 0X0A. I'm looking for some C# code to definitely strip that char out and replace it with either nothing or a blank space. Here's what I have tried: string fileLocation = "c:\\MyFile.txt"; var content = string.Empty; using (StreamReader reader = new System.IO.StreamReader(fileLocation)) { content = reader.ReadToEnd(); reader.Close(); } content = content.Replace('\u00A0', ' '); //also tried: content.Replace((char)0X0A, ' '); //also tried: content.Replace((char)0X0A, ''); //also tried: content.Replace((char)0X0A, (char)'\0'); Encoding encoding = Encoding.UTF8; using (FileStream stream = new FileStream(fileLocation, FileMode.Create)) { using (BinaryWriter writer = new BinaryWriter(stream, encoding)) { writer.Write(encoding.GetPreamble()); //This is for writing the BOM writer.Write(content); } } I also tried this code to get the actual string value: byte[] bytes = { 0x0A }; string text = Encoding.UTF8.GetString(bytes); And it comes back as "\n". So in the code above I also tried replacing "\n" with " ", both in double quotes and single quotes, but still no change. At this point I'm out of ideas. Anyone got any advice? Thanks.

    Read the article

  • I need help converting a C# string from one character encoding to another?

    - by Handleman
    According to Spolsky I can't call myself a developer, so there is a lot of shame behind this question... Scenario: From a C# application, I would like to take a string value from a SQL db and use it as the name of a directory. I have a secure (SSL) FTP server on which I want to set the current directory using the string value from the DB. Problem: Everything is working fine until I hit a string value with a "special" character - I seem unable to encode the directory name correctly to satisfy the FTP server. The code example below uses "special" character é as an example uses WinSCP as an external application for the ftps comms does not show all the code required to setup the Process "_winscp". sends commands to the WinSCP exe by writing to the process standardinput for simplicity, does not get the info from the DB, but instead simply declares a string (but I did do a .Equals to confirm that the value from the DB is the same as the declared string) makes three attempts to set the current directory on the FTP server using different string encodings - all of which fail makes an attempt to set the directory using a string that was created from a hand-crafted byte array - which works Process _winscp = new Process(); byte[] buffer; string nameFromString = "Sinéad O'Connor"; _winscp.StandardInput.WriteLine("cd \"" + nameFromString + "\""); buffer = Encoding.UTF8.GetBytes(nameFromString); _winscp.StandardInput.WriteLine("cd \"" + Encoding.UTF8.GetString(buffer) + "\""); buffer = Encoding.ASCII.GetBytes(nameFromString); _winscp.StandardInput.WriteLine("cd \"" + Encoding.ASCII.GetString(buffer) + "\""); byte[] nameFromBytes = new byte[] { 83, 105, 110, 130, 97, 100, 32, 79, 39, 67, 111, 110, 110, 111, 114 }; _winscp.StandardInput.WriteLine("cd \"" + Encoding.Default.GetString(nameFromBytes) + "\""); The UTF8 encoding changes é to 101 (decimal) but the FTP server doesn't like it. The ASCII encoding changes é to 63 (decimal) but the FTP server doesn't like it. When I represent é as value 130 (decimal) the FTP server is happy, except I can't find a method that will do this for me (I had to manually contruct the string from explicit bytes). Anyone know what I should do to my string to encode the é as 130 and make the FTP server happy and finally elevate me to level 1 developer by explaining the only single thing a developer should understand?

    Read the article

  • how to get selected chracter position in JTextArea?

    - by Reddy
    Hi! Here is a challenging question! Let me first tell you my scenario how am i implementing a solution to a problem. I am reading a log file and displaying it on the JTextArea. Log file is cp037 character coded. I was reading each file as a byte stream or byte array from the log file & displaying it. Anyways, i managed to display the text properly in JTextArea by cp037 character coding. Now, User may select a set of characters in the JTextArea. All i want is the position of first character of the user's selected text, from a nearest special character '+'(its character code in cp037 is 4E), which is prior to the selected text. This character may occur at several places in the JTextArea. In simple sentence, i want the first character location(of user selected text) from nearset '+' which should be occuring prior to the user's selected text. PS: cp037 is a type of character encoding scheme which is created by IBM & used for IBM Mainframes. Please fell free to ask me if the question is not clear...:-

    Read the article

  • Harmonizing Character Encoding Between Imported Data and MySQL

    MySQL's Latin-1 default encoding combined with MySQL 4.1.12's (or greater) UTF8 encoding allows the maximum number of characters codes, however incoming data with different character encoding can still present problems. Rob Gravelle shows you how to avoid problems before a lot of work is required to undo the damage.

    Read the article

  • Harmonizing Character Encoding Between Imported Data and MySQL

    MySQL's Latin-1 default encoding combined with MySQL 4.1.12's (or greater) UTF8 encoding allows the maximum number of characters codes, however incoming data with different character encoding can still present problems. Rob Gravelle shows you how to avoid problems before a lot of work is required to undo the damage.

    Read the article

  • Dynamic character animation - Using the physics engine or not

    - by Lex Webb
    I'm planning on building a dynamic reactant animation engine for the characters in my 2D Game. I have already built templates for a skeleton based animation system using key frames and interpolation to specify a limbs position at any given moment in time. I am using Farseer physics (an extension of Box2D) in Monogame/XNA in C# My real question lies in how i go about tying this character animation into the physics engine. I have two options: Moving limbs using physics engine - applying a interpolated force to each limb (dynamic body) in order to attempt to get it to its position as donated by the skeleton animation. Moving limbs by simply changing the position of a fixed body - Updating the new position of each limb manually, attempting to take into account physics collisions. Then stepping the physics after the animation to allow for environment interaction. Each of these methods have their distinct advantages and disadvantages. Physics based movement Advantages: Possibly more natural/realistic movement Better interaction with game objects as force applying to objects colliding with characters would be calculated for me. No need to convert to dynamic bodies when reacting to projectiles/death/fighting. Disadvantages: Possible difficulty in calculating correct amount of force to move a limb a certain distance at a constant rate. Underlying character balance system would need to be created that would need to be robust enough to prevent characters falling over at the touch of a feather. Added code complexity and processing time for the above. Static Object movement Advantages: Easy to interpolate movement of limbs between game steps Moving limbs is as simple as applying a rotation to the skeleton bone. Greater control over limbs, wont need to worry about characters falling over as all animation would be pre-defined. Disadvantages: Possible unnatural movement (Depends entirely on my animation skills!) Bad physics collision reactions with physics engine (Dynamic bodies simply slide out of the way of static objects) Need to calculate collisions with physics objects and my limbs myself and apply directional forces to them. Hard to account for slopes/stairs/non standard planes when animating walking/running animations. Need to convert objects to dynamic when reacting to projectile/fighting/death physics objects. The Question! As you can see, i have thought about this extensively, i have also had Google into physics based animation and have found mostly dissertation papers! Which is filling me with sense that it may a lot more advanced than my mathematics skills. My question is mostly subjective based on my findings above/any experience you may have: Which of the above methods should i use when creating my game? I am willing to spend the time to get a physics solution working if you think it would be possible. In the end i want to provide the most satisfying experience for the gamer, as well as a robust and dynamic system i can use to animate pretty much anything i need.

    Read the article

  • How game characters are made?

    - by Ahmed
    I'm new here. I would like to know how game characters are made that are movable? What kind of software and engines are used for these characters? I will be working with my friends on our final year project. Our game will be FPS and I have to draw some animations for FPS view and other enemy character that can be programmed easily to make a good game. Sorry if my questions seems dumb, but if you need more explanation i'm always here to discuss Thanks in advance

    Read the article

  • htaccess Redirect / RedirectMatch with URLs that contain Special / Encoded Characters

    - by dSquared
    I'm currently in the process of applying a variety of 301 redirects in an .htaccess file for a website that recently changed its structure. Everything is working as expected, except for URLs that contain special characters, for these I am getting 404 errors. For example the following directives that have a registered trademark symbol (®) bring up 404 pages: RedirectMatch 301 ^/directory/link-with®-special-character(/)?$ somelink.com RedirectMatch 301 ^/directory/link-with%c2%ae-special-character(/)?$ somelink.com I've also tried using Redirect, RewriteRule and surrounding the urls with double quotes and nothing seems to work. Does anyone know what might be happening or the proper way to handle these types of directives? Any help is greatly appreciated.

    Read the article

  • Replace special text with sed?

    - by user143822
    I'm using CMD on Windows Xp to replace special text with Sed. I'm using this command for replace special characters like $ or * : sed -i "s/\*/123/g;" 1.txt But how command must i use to replace this strings with ciao! in my text files? Is possible? \\ \\\ "" sed.exe -i "s/{\*)(//123/ sed -i "s/\\/123/g;" 1.txt the previous command does not work because i have \, " and other special strings that sed use to make regex.

    Read the article

  • Encoding gives "'ascii' codec can't encode character … ordinal not in range(128)"

    - by user140314
    I am working through the Django RSS reader project here. The RSS feed will read something like "OKLAHOMA CITY (AP) — James Harden let". The RSS feed's encoding reads encoding="UTF-8" so I believe I am passing utf-8 to markdown in the code snippet below. The em dash is where it chokes. I get the Django error of "'ascii' codec can't encode character u'\u2014' in position 109: ordinal not in range(128)" which is an UnicodeEncodeError. In the variables being passed I see "OKLAHOMA CITY (AP) \u2014 James Harden". The code line that is not working is: content = content.encode(parsed_feed.encoding, "xmlcharrefreplace") I am using markdown 2.0, django 1.1, and python 2.4. What is the magic sequence of encoding and decoding that I need to do to make this work? Thanks.

    Read the article

  • Java: How to get Unicode name of a character (or its type category)?

    - by java.is.for.desktop
    Hello, everyone! The Character class in Java defines methods which check a given char argument for equality with certain Unicode chars or for belonging to some type category. These chars and type categories are named. As stated in given javadoc, examples for named chars are HORIZONTAL TABULATION, FORM FEED, ...; example for named type categories are SPACE_SEPARATOR, PARAGRAPH_SEPARATOR, ... However, being byte or int values instead of enums, the name of these types are "hidden" at runtime. So, is there a possibility to get characters' and/or type categories' names at runtime?

    Read the article

  • Dr. Robert Ballard: Special Guest at Java Strategy Keynote Sunday

    - by Tori Wieldt
    Dr. Robert Ballard, famed explorer who found the Titanic at its final resting place, will be at the Java Strategy Keynote on Sunday. Among the most accomplished and well known of the world's deep-sea explorers, Dr. Ballard is best known for his historic discoveries of hydrothermal vents, the sunken R.M.S. Titanic, the German battleship Bismarck, and numerous other contemporary and ancient shipwrecks around the world. During his long career he has conducted more than 120 deep-sea expeditions using the latest in exploration technology, and he is a pioneer in the early use of deep-diving submarines. You can learn more about Dr. Ballard and undersea exploration at National Geographic and TED. The first 1,000 people to arrive at the JavaOne Keynote hall on Sunday will receive a copy of Dr. Ballard's TV show "The Alien Deep" on Blu-Ray. The Alien Deep explores the sea, thousands of feet beneath the surface, far from the first crack of light, where the planet’s last and greatest secrets hide in the cold darkness of endless night. Viewers get to see underwater worlds via submersible where no one has gone before. The JavaOne Strategy Keynote is on Sunday at 4:00pm PT at Masonic Auditorium, 1111 California Street. See you there!

    Read the article

  • Visual Studio 2010 Professional special launch offer!

    - by Etienne Tremblay
    Hello everyone, long time no blog… I’ll try to get back in the game soon but with 2 customer and user group and life in general let’s just say I’m busy.  In the meantime I’m passing along this great offer. Microsoft Visual Studio 2010 Professional will launch on April 12 but you can beat the rush and secure your copy today by pre-ordering at the affordable estimated retail price of $549, a saving of $250. If you use a previous version of Visual Studio or any other development tool then you are eligible for this upgrade. Along with all the great new features in Visual Studio 2010 (see www.microsoft.com/visualstudio) Visual Studio 2010 Professional includes a 12-month MSDN Essentials subscription which gives you access to core Microsoft platforms: Windows 7 Ultimate, Windows Server 2008 R2 Enterprise, and Microsoft SQL Server 2008 R2 Datacenter. So visit http://www.microsoft.com/visualstudio/en-us/pre-order-visual-studio-2010 to check out all the new features and sign up for this great offer.   Cheers, ET Technorati Tags: VS2010

    Read the article

  • Is there something special about the number 65535?

    - by Nick Rosencrantz
    2¹6-1 & 25 = 25 (or? obviously ?) A developer asked me today what is bitwise 65535 & 32 i.e. 2¹6-1 & 25 = ? I thought at first spontaneously 32 but it seemed to easy whereupon I thought for several minutes and then answered 32. 32 seems to have been the correct answer but how? 65535=2¹6-1=1111111111111111 (but it doesn't seem right since this binary number all ones should be -1(?)), 32 = 100000 but I could not convert that in my head whereupon I anyway answered 32 since I had to answer something. Is the answer 32 in fact trivial? Is in the same way 2¹6-1 & 25-1 =31? Why did the developer ask me about exactly 65535? Binary what I was asked to evaluate was 1111111111111111 & 100000 but I don't understand why 1111111111111111 is not -1. Shouldn't it be -1? Is 65535 a number that gives overflow and how do I know that?

    Read the article

  • New York Coherence Special Interest Group, Jan 13 2011

    - by ruma.sanyal
    Please join us for our next exciting event. We are pleased to announce that Aleksander Seovic, Craig Blitz and Madhav Sathe will be presenting to our group. Presentation details are provided below. Time: 3:00pm - 6:00pm ET Where: Oracle Office, Room 30076, 520 Madison Avenue, 30th Floor, NY We will be providing snacks and beverages. Register! - Registration is required for building security. Presentations:? Getting the Most out of your Coherence Cluster with Oracle Enterprise Manager - Madhav Sathe, Principal Product Manager (Oracle) How To Build a Coherence Practice - Craig Blitz, Senior Principal Product Manager (Oracle) Congratulations on your decision to buy Oracle Coherence. We believe you have chosen an excellent product. Now the hard work begins. To help you get the most out of Coherence from both a project and enterprise perspective, this talk will introduce you to resources available from Oracle and through the Coherence ecosystem. The talk will also discuss best organizational practices you can implement to ensure success with Coherence. The speaker will use his significant experience with customers' Coherence deployment to show what works and what doesn't in practice. Coherence in the Cloud - Aleksandar Seovic, Founder and Managing Director (S4HC) Amazon Web Services cloud provides great and affordable foundation for the next generation of scalable web applications. Application servers, load balancers, and scalable storage can be provisioned in a matter of minutes and used for pennies an hour. However, AWS cloud also brings a set of new architectural challenges, such as transient file systems and dynamically assigned IP addresses. In this session we will look at a real-world example of how Coherence can be used to address some of these challenges and show why the combination of AWS cloud and Coherence has a great synergy.

    Read the article

  • Oracle Delivers Special Recognition for Specialized Partners

    - by michaela.seika(at)oracle.com
    Since announcing Oracle PartnerNetwork Specialized (OPN Specialized) in October 2009, Oracle has been focused on building a program that first enables solution providers to become highly skilled Oracle partners who deliver value to customers and that then recognizes and rewards their achievements in a meaningful way. Today the company unveiled new benefits reserved for partners who have achieved one or more of the over 50 specializations currently available. The benefits demonstrate Oracle's commitment to showcase these valued partners to three key audiences: customers, other partners, and Oracle employees.With today's launch of www.oracle.com/specialized Oracle has taken what IDC believes is a first of its kind approach to putting top partners front and center with customers and prospects. While most vendors offer a business partner finder tool on their website none has gone as far as Oracle with the creation of this new site dedicated to the promotion of Specialized Partners. The tag lines - "Recognized by Oracle, Preferred by Customers" and "Specialized. Recognized. Preferred." gets right to the point - these are the solution providers with which customers should choose to engage. The contents of the page offer multiple proof points to justify the marketing phrases.One of the benefits Oracle offers its Specialized Partners is video creation and placement. While Oracle works with partners to create informal or "guerilla" videos which often are placed on YouTube to generate awareness and buzz, the company also produces professional videos for its partners. The greatest value the partner receives from this benefit isn't the non-trivial production costs that Oracle covers but instead the prominent exposure Oracle gives the finished product. Partner videos are featured on www.oracle.com/specialized, used as part of monthly OPN Specialized Partners monthly webcasts, placed on a customer facing website, the Oracle Media Network, which includes several partner sites such as PartnerCast. A solution provider gains a great deal of credibility when they can send a prospect to an Oracle website where they are featured. Read the full article here.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >