Search Results

Search found 4929 results on 198 pages for 'character'.

Page 31/198 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Cannot Display Chinese Character in my PHP code

    - by Jun1st
    I want to display my Twitter Info in my blog. So I write some code to get it. the issue I got is that Chinese characters displayed as unknown code. Here is the test code. Could anyone take a look and help? Thanks <html> <title>Twitter Test</title> <body> <?php function mystique_objectToArray($object){ if(!is_object($object) && !is_array($object)) return $object; if(is_object($object)) $object = get_object_vars($object); return array_map('mystique_objectToArray', $object); } define( 'ABSPATH', dirname(dirname(__FILE__)) . '/' ); require_once('/home/jun1st/jun1stfeng.com/wp-includes/class-snoopy.php'); $snoopy = new Snoopy; $response = @$snoopy->fetch("http://twitter.com/users/show/jun1st.json"); if ($response) $userdata = json_decode($snoopy->results, true); else $error = true; $response = @$snoopy->fetch("http://twitter.com/statuses/user_timeline/jun1st.json"); if ($response) $tweets = json_decode($snoopy->results, true); else $error = true; if(!$error): // for php < 5 (included JSON returns object) $userdata = mystique_objectToArray($userdata); $tweets = mystique_objectToArray($tweets); $twitdata = array(); $twitdata['user']['profile_image_url'] = $userdata['profile_image_url']; $twitdata['user']['name'] = $userdata['name']; $twitdata['user']['screen_name'] = $userdata['screen_name']; $twitdata['user']['followers_count'] = $userdata['followers_count']; $i = 0; foreach($tweets as $tweet): $twitdata['tweets'][$i]['text'] = $tweet['text']; $twitdata['tweets'][$i]['created_at'] = $tweet['created_at']; $twitdata['tweets'][$i]['id'] = $tweet['id']; $i++; endforeach; endif; // only show if the twitter data from the database is newer than 6 hours if(is_array($twitdata['tweets'])): ?> <div class="clear-block"> <div class="avatar"><img src="<?php echo $twitdata['user']['profile_image_url']; ?>" alt="<?php echo $twitdata['user']['name']; ?>" /></div> <div class="info"><a href="http://www.twitter.com/jun1st"><?php echo $twitdata['user']['name']; ?> </a><br /><span class="followers"> <?php printf(__("%s followers","mystique"),$twitdata['user']['followers_count']); ?></span></div> </div> <ul> <?php $i = 0; foreach($twitdata['tweets'] as $tweet): $pattern = '/\@(\w+)/'; $replace = '<a rel="nofollow" href="http://twitter.com/$1">@$1</a>'; $tweet['text'] = preg_replace($pattern, $replace , $tweet['text']); $tweet['text'] = make_clickable($tweet['text']); // remove +XXXX $tweettime = substr_replace($tweet['created_at'],'',strpos($tweet['created_at'],"+"),5); $link = "http://twitter.com/".$twitdata['user']['screen_name']."/statuses/".$tweet['id']; echo '<li><span class="entry">' . $tweet['text'] .'<a class="date" href="'.$link.'" rel="nofollow">'.$tweettime.'</a></span></li>'; $i++; if ($i == $twitcount) break; endforeach; ?> </ul> <? endif?> ?> </body> </html>

    Read the article

  • VB.net Insert Environment.NewLine at 20 characters.

    - by xzerox
    Well I have been able to figure this out but what I want to do is make my string have a new line after 20 chars. I know how to find how many chars the string has but not how to insert environment.newline at 20 chars. I am using this to find the string length If string.Length > 20 then 'Need to be able to insert environment.newline at 20 chars Else 'Normal string End If

    Read the article

  • IS there a simple way to remove Alt-Character shortcuts at runtime

    - by Dan Neely
    I have a dialog with a number of Alt-Letter shortcuts on labels for textboxes/etc. This dialog can present data in either an editable or a read-only mode. I've received a request to hide the underlines for the shortcuts if the dialog is in read only mode. Other than editing the label text at runtime (ugh) is there any way to remove them? If you don't know what I'm referring to by alt-Letter shortcuts see this question.

    Read the article

  • Possible Encoding Issue Reading HTM File using .Net Streamreader

    - by Brian Boatright
    I have an HTML file with a ® (copyright) and ™ (trademark) symbol in the text. These are just two among many other symbols. When I read the html file into a literal control it converts the symbols to something else. The copyright symbol converts to ? (open box in ff) The trademark symbol converts to ™ (as expected) If (System.IO.File.Exists(FullName)) Then Dim StreamReader1 As New System.IO.StreamReader(FullName) Contents.Text = StreamReader1.ReadToEnd() StreamReader1.Close() End If Contents is a <asp:Literal runat="server" ID="Contents"></asp:Literal> and it's the only control in the aspx page. From some research I think this is related to the encoding but I don't know why it would change how to fix it. The html file does not contain any Content-Type settings in the head section.

    Read the article

  • Repair bad character due to encoding problem

    - by remi bourgarel
    Hi all, Recently we had an encoding problem in our system : If we had the string "æ" in our db ,it became "æ" on our web pages. Now this problem is solved, but the problem is that now we have a lot of "æ" in our database : users didn't see and validate pre-filled form with these characters. I found that If you read in utf 8 C3A6 you'll get "æ", if you read it in ascii you'll get "æ". It's strange because if I execute "select convert(varbinary(40),N'æ'),convert(varbinary(40),'æ')" I don't have the same result... Do you have any idea on how I can fix my database (ie change all "æ" to "æ") ? thx

    Read the article

  • Why is my GetNextChar() in my DecoderFallbackBuffer Specialization Repeatedly Getting Called?

    - by Canoehead
    I need to produce my own DecoderFallback and DecoderFallbackBuffer classes to implement some custom stream decoding. I have found that the stream reader making use of it is calling GetNextChar() repeatedly even when my specilizaed DecoderFallbackBuffer.Remaining property returns 0 to indicate that there no more characters to return. The end result is that the stream reader gets into an infinite loop. Why is this happening?

    Read the article

  • Handling Character Encoding in URI on Tomcat

    - by ZZ Coder
    On the web site I am trying to help with, user can type in an URL in the browser, like following Chinese characters, http://localhost:8080?a=?? On server, we get GET /a=%E6%B5%8B%E8%AF%95 HTTP/1.1 As you can see, it's UTF-8 encoded, then URL encoded. We can handle this correctly by setting encoding to UTF-8 in Tomcat. However, sometimes we get Latin1 encoding on certain browsers, http://localhost:8080?a=ß turns into GET /a=%DF HTTP/1.1 Is there anyway to handle this correctly in Tomcat? Looks like the server has to do some intelligent guessing. We don't expect to handle the Latin1 correctly 100% but anything is better than what we are doing now by assuming everything is UTF-8. The server is Tomcat 5.5. The supported browsers are IE 6+, Firefox 2+ and Safari on iPhone.

    Read the article

  • special character coming when i am using & and p

    - by radick
    hi all I dont know what exactly i have to type in title for this ,i tried my best anyway coming to topic I am making one acc checker for that purpose ,i am sending user and pass from my bsskinedit1 and bsskinedit2 here is my code s:='http:\\site.com..premlogin='+bsskinedit.text+'&password='+bsskinedit2.text but it giving some error ,then i used showmessage whats wrong with it then i came with strange result see below http://i39.tinypic.com/2415d77.jpg observer after 4 & and p combining together and appearing as a some new symbol :( can any one tell me why its coming like this ?

    Read the article

  • ASP.NET - Trailing Slash and Tilde

    - by Echilon
    I've found what seems like a bizarre problem with IIS 6.0 and .NET 3.5. I always use the tilde for all URLs (eg: ~/mypage.aspx) so if I go to mydomain.com/mypage.aspx, everything works fine. If, however, I add a trailing slash and go to mydomain.com/mypage.aspx/, all links on the page which use the tilde get rendered as mydomain.com/mypage.aspx/otherpage.aspx instead of mydomain.com/otherpage.aspx. This happens with all controls. Has anyone had this issue before?

    Read the article

  • Ruby character encoding problems in netbeans and command wíndow

    - by salgo60
    I use netbeans as development IDE and runs the application from cmd but have problems to display ISO 8859-1 characters like åäö correct in both cmd window and when I run the application from netbeans Question: What is best practice to set it up Right now I do @output.puts indent + "V" + 132.chr + "lkommen till Ruby Camping!" to get ä My environment chcp 65001 Active code page: 65001 ruby main.rb Source encoding: <Encoding:US-ASCII> Default external: #<Encoding:UTF-8> Default internal: nil Locale charmap: "CP65001" where I have in the code def self.printEncoding puts "Source encoding: #{__ENCODING__.inspect}" if defined? __ENCODING__ if defined? Environment::Encoding puts "Default external: #{Encoding.default_external.inspect}" puts "Default internal: #{Encoding.default_internal.inspect}" puts "Locale charmap: #{ Encoding.locale_charmap.inspect}" end puts "LANG environment variable: #{ENV['LANG'].inspect}" unless ENV['LANG'].nil? end ruby -v ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]

    Read the article

  • any character notation for php regular expression

    - by Mith
    In my regex, I want to say that within the sample text, any characters are allowed, including a-z in upper and lower case, numbers and special characters. For example, my regular expression may be checking that a document is html. therefore: "/[]+/" i have tried []+ but it does not seem to like this?

    Read the article

  • Primefaces push encoding

    - by kalaoke
    I use primefaces push to write a message in a p:notificationBar. if i push a message with specials characters (like russians char), I've got '?' in my message. How can I fix this problem ? Thanks for your help. (config : primefaces 3.4 and jsf2. All my html pages are utf8 encoding). Here is my view code : <p:notificationBar id="bar" widgetVar="pushNotifBar" position="bottom" style="z-index: 3;border: 8px outset #AB1700;width: 97%;background: none repeat scroll 0 0 #CA837D;"> <h:form prependId="false"> <p:commandButton icon="ui-icon-close" title="#{messages['gen.close']}" styleClass="ui-notificationbar-close" type="button" onclick="pushNotifBar.hide();"/> </h:form> <h:panelGrid columns="1" style="width: 100%; text-align: center;"> <h:outputText id="pushNotifSummary" value="#{growlBean.summary}" style="font-size:36px;text-align:center;"/> <h:outputText id="pushNotifDetail" value="#{growlBean.detail}" style="font-size: 20px; float: left;" /> </h:panelGrid> </p:notificationBar> <p:socket onMessage="handleMessage" channel="/notifications"/> <script type="text/javascript"> function handleMessage(data) { var substr = data.split(' %% '); $('#pushNotifSummary').html(substr[0]); $('#pushNotifDetail').html(substr[1]); pushNotifBar.show(); } </script> and my Bean code : public void send() { PushContext pushContext = PushContextFactory.getDefault().getPushContext(); String var = summary + " %% " + detail; pushContext.push("/notifications", var);

    Read the article

  • Ruby character encoding problems in netabenas and command wíndow

    - by salgo60
    I use netbeans as development IDE and runs the application from cmd but have problems to display ISO 8859-1 characters like åäö correct in both cmd window and when I run the application from netbeans Question: What is best practice to set it up Right now I do @output.puts indent + "V" + 132.chr + "lkommen till Ruby Camping!" to get ä My environment chcp 65001 Active code page: 65001 ruby main.rb Source encoding: <Encoding:US-ASCII> Default external: #<Encoding:UTF-8> Default internal: nil Locale charmap: "CP65001" where I have in the code def self.printEncoding puts "Source encoding: #{__ENCODING__.inspect}" if defined? __ENCODING__ if defined? Environment::Encoding puts "Default external: #{Encoding.default_external.inspect}" puts "Default internal: #{Encoding.default_internal.inspect}" puts "Locale charmap: #{ Encoding.locale_charmap.inspect}" end puts "LANG environment variable: #{ENV['LANG'].inspect}" unless ENV['LANG'].nil? end ruby -v ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]

    Read the article

  • How to get non-latin characters from website?

    - by latata
    I try to get data from latata.pl/pl.php and view all sign (polish - iso-8859-2) final URL url = new URL("http://latata.pl/pl.php"); final URLConnection urlConnection = url.openConnection(); final BufferedReader in = new BufferedReader(new InputStreamReader( urlConnection.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } in.close(); It doesn't work. :( Any ideas?

    Read the article

  • Umlaute from JSP-page are misinterpreted

    - by Karin
    I'm getting Input from a JSP page, that can contain Umlaute. (e.g. Ä,Ö,Ü,ä,ö,ü,ß). Whenever an Umlaut is entered in the Input field an incorrect value gets passed on. e.g. If an "ä" (UTF-8:U+00E4) gets entered in the input field, the String that is extracted from the argument is "ä" (UTF-8: U+00C3 and U+00A4) It seems to me as if the UTF-8 hex encoding (which is c3 a4 for an "ä") gets used for the conversion. How can I retrieved the correct value? Here are snippets from the current implementation The JSP-page passes the input value "pk" on to the processing logic: <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> ... <input type="text" name="<%=pk.toString()%>" value="<%=value%>" size="70"/> <button type="submit" title="Edit" value='Save' onclick="action.value='doSave';pk.value='<%=pk.toString()%>'"><img src="icons/run.png"/>Save</button> The value gets retrieved from args and converted to a string: UUID pk = UUID.fromString(args.get("pk")); //$NON-NLS-1$ String value = args.get(pk.toString()); Note: Umlaute that are saved in the Database get displayed correctly on the page.

    Read the article

  • python to display the special characters

    - by Suhail
    Hi, I am facing issues with the special characters like ° and ® which represent the degreee Farenheit sign and the ® represent the registered sign, when i print the string the contains the special characters, it gives output like this: Preheat oven to 350&deg F Welcome to Lorem Ipsum Inc&reg is there a way i can output the exact characters and not their codes ? please let me know.

    Read the article

  • Reading Character from Image

    - by Chinjoo
    I am working on an application which requires matching of numbers from a scanned image file to database entry and update the database with the match result. Say I have image- employee1.jpg. This image will have two two handwritten entries - Employee number and the amount to be paid to the employee. I have to read the employee number from the image and query the database for the that number, update the employee with the amount to be paid as got from the image. Both the employee number and amount to be paid are written inside two boxes at a specified place on the image. Is there any way to automate this. Basically I want a solution in .net using c#. I know this can be done using artificial neural networks. Any ideas would be much appreciated.

    Read the article

  • Why is this c# snippet legal?

    - by Sir Psycho
    Silly question, but why does the following line compile? int[] i = new int[] {1,}; As you can see, I haven't entered in the second element and left a comma there. Still compiles even though you would expect it not to.

    Read the article

  • XHTML Validation issue trying to render '&' character inside an ASP.Net control

    - by Micah
    Ok, the description is kind of funky, but here's my problem: <asp:ListItem Value="0">All Leads <i>(include Archive & Trash)</i></asp:ListItem> <asp:ListItem Value="0">All Leads <i>(include Archive &amp; Trash)</i></asp:ListItem> <asp:ListItem Value="0" Text="All Leads <i>(include Archive & Trash)</i>" /> <asp:ListItem Value="0" Text="All Leads <i>(include Archive &amp; Trash)</i>" /> All three versions render the following html All Leads <i>(include Archive & Trash)</i> This of course fails XHTML validation. It needs to render the html like this: All Leads <i>(include Archive &amp; Trash)</i> How can I fix this? Thanks.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >