Re: Output Unicode
Oh thanks, this is helpful. I can see that it is very complicated to use Unicode standards. I have seen that on that page I can read the text in romanian language, but even though I can read well some chars, I am not able to read other special chars and I can read just question marks instead. I know that I might need to install some fonts in order to be able to read them correctly, but it might be a problem with the UTF encoding of that page, because as I said, I am able to read Google's page without problems. Teddy - Original Message - From: mt m [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, April 01, 2004 9:23 PM Subject: Re: Output Unicode I think it's your font support. Go to http://www.columbia.edu/kermit/utf8.html This multilingual page has strings in many languages - all UTF-8 encoded. If your browser can't render text for a specific language on this page, then the problem is your font support. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Output Unicode
Oh thanks, this is helpful. I can see that it is very complicated to use Unicode standards. well it can be. But if you've got a new browser (mozilla 1.6), and a reasonably new OS, - Solaris 9/XP/JDS then you should be fine for viewing UTF-8 encoded pages in most languages. I have seen that on that page I can read the text in romanian language, but even though I can read well some chars, I am not able to read other special chars and I can read just question marks instead. I know that I might need to install some fonts in order to be able to read them correctly, yes. 9 times out of 10, the question mark problem is indicative of a font issue - not an encoding one. but it might be a problem with the UTF encoding of that page, no! because as I said, I am able to read Google's page without problems. Google doesn't always use UTF-8. For example, if you use Netscape 4.7x (no one should use it, but it's out there...) and fetch http://www.google.com, it'll return the page iso-8859-1 encoded. If you fetch http://google.co.jp it'll return it encoded as Shift_jis (or some other native japanese encoding) etc. i.e. Google recognises that older browsers don't really support UTF-8 well - so they send content in native encodings instead. Teddy - Original Message - From: mt m [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, April 01, 2004 9:23 PM Subject: Re: Output Unicode I think it's your font support. Go to http://www.columbia.edu/kermit/utf8.html This multilingual page has strings in many languages - all UTF-8 encoded. If your browser can't render text for a specific language on this page, then the problem is your font support. _ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Output Unicode
Yes but I get Google's page with Internet Explorer 6 and I can see that the page uses UTF-8. And I can see teh page fine. But that example page read with IE6 also, is not read correctly. T. - Original Message - From: mt m [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, April 02, 2004 3:47 PM Subject: Re: Output Unicode Oh thanks, this is helpful. I can see that it is very complicated to use Unicode standards. well it can be. But if you've got a new browser (mozilla 1.6), and a reasonably new OS, - Solaris 9/XP/JDS then you should be fine for viewing UTF-8 encoded pages in most languages. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: How to undine a value
I find I'm undefining variables my assigning an unitialized variable to defined value to make it undefined (as exemplified below). Is there a better way to do this? my $k; for($i = 0; $i $c; $i++){ if ( defined $k ){ print $x[$k]; my $t; # intentionally undefined $k = $t; # undefine $k } else { $k = $i; } } Unless this is a contrived example, just increment $i by 2 each loop. If it is contrived then the other answers should work... http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: How to undine a value
Wiggins d Anconia wrote: my $k; for($i = 0; $i $c; $i++){ if ( defined $k ){ print $x[$k]; my $t; # intentionally undefined $k = $t; # undefine $k } else { $k = $i; } } Unless this is a contrived example, just increment $i by 2 each loop. If it is contrived then the other answers should work... Well, $c and @x were never defined/explained by the time this contruct was presented. -- -Sx- [This message contains no user serviceabe code.] use strict; use warnings; use diagnostics; my (@x) = qw% But for sanities sake %; my ($c, $i, $k, $t) = 2**32+1; undef $k; for($i=0, $c=2; $i$c; $i=0) { if ( defined $k ) { print $x[$k]; $k = $t; } else { $k = $c; } } __END__ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Output Unicode
which google url are you accessing? From: Octavian Rasnita [EMAIL PROTECTED] To: mt m [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Output Unicode Date: Fri, 2 Apr 2004 15:59:10 +0300 MIME-Version: 1.0 Received: from onion.perl.org ([63.251.223.166]) by mc2-f14.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Fri, 2 Apr 2004 04:54:59 -0800 Received: (qmail 80022 invoked by uid 1005); 2 Apr 2004 12:54:55 - Received: (qmail 80007 invoked by uid 76); 2 Apr 2004 12:54:54 - X-Message-Info: JGTYoYF78jE9bEGLbvndwDuh3RJSuy17 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk List-Post: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Spam-Status: No, hits=0.0 required=7.0tests= X-Spam-Check-By: la.mx.develooper.com Message-ID: [EMAIL PROTECTED] References: [EMAIL PROTECTED] X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 02 Apr 2004 12:54:59.0231 (UTC) FILETIME=[B4A692F0:01C418B1] Yes but I get Google's page with Internet Explorer 6 and I can see that the page uses UTF-8. And I can see teh page fine. But that example page read with IE6 also, is not read correctly. T. - Original Message - From: mt m [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, April 02, 2004 3:47 PM Subject: Re: Output Unicode Oh thanks, this is helpful. I can see that it is very complicated to use Unicode standards. well it can be. But if you've got a new browser (mozilla 1.6), and a reasonably new OS, - Solaris 9/XP/JDS then you should be fine for viewing UTF-8 encoded pages in most languages. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Script not behaving the same when run under perl and mod_perl
I have written a report that takes one parameter from a form and then creates a report from it. All this is done in one script and creates two web pages (the form page and the report page). I run it from the cgi-bin directory in Apache 1.3 (Windows machine) and it passes the parameters ($cgi-param{'timeframe'}). I run it from perl directory (mod_perl) in Apache 1.3 (Linux machine). It does not pass any parameters. I can run it under mod_ssl or no mod_ssl and get the same issue. This might be a question for Apache configuration, but I figured I would start here. Windows machine Win 2000 pro Apache 1.3.14 Perl 5.6 Linux machine Fedora Core rel 1 Apache 1.3.29 perl 5.8.1 mod_perl 1.29 mod_ssl 2.8.16-1.3.29 openssl 0.9.7d Any assistance you be much appreciated. Thanks, Loren
Re: Script not behaving the same when run under perl and mod_perl
Loren Erwin wrote: This might be a question for Apache configuration, but I figured I would start here. http://perl.apache.org/docs/1.0/guide/help.html#How_to_Report_Problems If your script doesnt work under mod_perl try mod_cgi (If mod_cgi was built into the httpd server.) read: http://perl.apache.org/docs/1.0/guide/config.html And join: http://perl.apache.org/maillist/index.html -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Streaming a file to a remote user
Hi Jason, Good advice. Keep in mind that it was just something to get him started. I don't have time to write the software for him in entirety unless I'm getting paid, so I just sent off some code I've had sitting around in partial completion in my dev/ folder for a couple years now. It works fine for quickly downloading files to my internal workstation. Certainly there are many discrepancies. It wasn't presented it as production ready code. Hopefully between us and the others here, we've provided enough that he can take it up where we left off. Sound advice and constructive criticism are always welcome. Health, Shaun snip The periods inside $remote_ip will match any character, not just periods. Better safe than sorry. if ($ENV{REMOTE_ADDR} =~ /^\Q$remote_ip\E/) { /snip snip Here's my (untested) attempt. /snip Glad I could provide you with something to build on. ;) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Output Unicode
I am accessing www.google.com which redirects to www.google.ro, or www.google.com/ncr T - Original Message - From: mt m [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, April 02, 2004 6:35 PM Subject: Re: Output Unicode which google url are you accessing? From: Octavian Rasnita [EMAIL PROTECTED] To: mt m [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Output Unicode Date: Fri, 2 Apr 2004 15:59:10 +0300 MIME-Version: 1.0 Received: from onion.perl.org ([63.251.223.166]) by mc2-f14.hotmail.com with Microsoft SMTPSVC(5.0.2195.6824); Fri, 2 Apr 2004 04:54:59 -0800 Received: (qmail 80022 invoked by uid 1005); 2 Apr 2004 12:54:55 - Received: (qmail 80007 invoked by uid 76); 2 Apr 2004 12:54:54 - X-Message-Info: JGTYoYF78jE9bEGLbvndwDuh3RJSuy17 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk List-Post: mailto:[EMAIL PROTECTED] List-Help: mailto:[EMAIL PROTECTED] List-Unsubscribe: mailto:[EMAIL PROTECTED] List-Subscribe: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Delivered-To: [EMAIL PROTECTED] X-Spam-Status: No, hits=0.0 required=7.0tests= X-Spam-Check-By: la.mx.develooper.com Message-ID: [EMAIL PROTECTED] References: [EMAIL PROTECTED] X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Return-Path: [EMAIL PROTECTED] X-OriginalArrivalTime: 02 Apr 2004 12:54:59.0231 (UTC) FILETIME=[B4A692F0:01C418B1] Yes but I get Google's page with Internet Explorer 6 and I can see that the page uses UTF-8. And I can see teh page fine. But that example page read with IE6 also, is not read correctly. T. - Original Message - From: mt m [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, April 02, 2004 3:47 PM Subject: Re: Output Unicode Oh thanks, this is helpful. I can see that it is very complicated to use Unicode standards. well it can be. But if you've got a new browser (mozilla 1.6), and a reasonably new OS, - Solaris 9/XP/JDS then you should be fine for viewing UTF-8 encoded pages in most languages. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response
Re: Output Unicode
Octavian Rasnita wrote: I am accessing www.google.com which redirects to www.google.ro, or www.google.com/ncr That is an auto-handshake between your browser and google. It means you've properly set-up what Language(s) you want first and google is trying to be helpful. (In a previous note I said that the example page was likely created wrong or you are missing a MIME handshake that IE6 wants...) Does the page display correctly in Moz 1.6? Does the page in question use MIME Content bodies or is it an XML-Stylesheet? At any rate this is likely OT for a CGI group. My Apache 2.x WWW server knows about theses # Danish (da) - Dutch (nl) - English (en) - Estonian (et) # French (fr) - German (de) - Greek-Modern (el) # Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (ko) # Portugese (pt) - Luxembourgeois* (ltz) # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cs) # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja) # Russian (ru) - Croatian (hr) # AddLanguage da .dk AddLanguage nl .nl AddLanguage en .en AddLanguage et .et AddLanguage fr .fr AddLanguage de .de AddLanguage he .he AddLanguage el .el AddLanguage it .it AddLanguage ja .ja AddLanguage pl .po AddLanguage ko .ko AddLanguage pt .pt AddLanguage nn .nn AddLanguage no .no AddLanguage pt-br .pt-br AddLanguage ltz .ltz AddLanguage ca .ca AddLanguage es .es AddLanguage sv .sv AddLanguage cs .cz .cs AddLanguage ru .ru AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw AddLanguage hr .hr # # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback # # Specify a default charset for all pages sent out. This is # always a good idea and opens the door for future internationalisation # of your web site, should you ever want it. Specifying it as # a default does little harm; as the standard dictates that a page # is in iso-8859-1 (latin1) unless specified otherwise i.e. you # are merely stating the obvious. There are also some security # reasons in browsers, related to javascript and URL parsing # which encourage you to always set a default char set. # AddDefaultCharset ISO-8859-1 # # Commonly used filename extensions to character sets. You probably # want to avoid clashes with the language extensions, unless you # are good at carefully testing your setup after each change. # See http://www.iana.org/assignments/character-sets for the # official list of charset names and their respective RFCs. # AddCharset ISO-8859-1 .iso8859-1 .latin1 AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen AddCharset ISO-8859-3 .iso8859-3 .latin3 AddCharset ISO-8859-4 .iso8859-4 .latin4 AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk AddCharset ISO-2022-JP .iso2022-jp .jis AddCharset ISO-2022-KR .iso2022-kr .kis AddCharset ISO-2022-CN .iso2022-cn .cis AddCharset Big5.Big5 .big5 # For russian, more than one charset is used (depends on client, mostly): AddCharset WINDOWS-1251 .cp-1251 .win-1251 AddCharset CP866 .cp866 AddCharset KOI8-r .koi8-r .koi8-ru AddCharset KOI8-ru .koi8-uk .ua AddCharset ISO-10646-UCS-2 .ucs2 AddCharset ISO-10646-UCS-4 .ucs4 AddCharset UTF-8 .utf8 # The set below does not map to a specific (iso) standard # but works on a fairly wide range of browsers. Note that # capitalization actually matters (it should not, but it # does for some browsers). # # See http://www.iana.org/assignments/character-sets # for a list of sorts. But browsers support few. # AddCharset GB2312 .gb2312 .gb AddCharset utf-7 .utf7 AddCharset utf-8 .utf8 AddCharset big5.big5 .b5 AddCharset EUC-TW .euc-tw AddCharset EUC-JP .euc-jp AddCharset EUC-KR .euc-kr AddCharset shift_jis .sjis And, if I choose, I can send out language specific content using this type of file: #Directory /usr/local/apache2/error #AllowOverride None #Options IncludesNoExec #AddOutputFilter Includes html #AddHandler type-map var #Order allow,deny #Allow from all #LanguagePriority en cs de es fr it nl sv pt-br ro #ForceLanguagePriority Prefer Fallback #/Directory On a directory by directory basis (this example is from errors as I dont serve anything but generic American English.) My advice? Find out what Google is doing so you can