Archive for May, 2005|Monthly archive page
First one is Open Source Funda
It is amazing what you can accomplish if you do not care who gets the credit.
— Harry S Truman
What makes it so hard is not that you had it bad, but that you’re that pissed that so many others had it good.
–Anony
A man’s silence is wonderful to listen to.
— Thomas Hardy
Life is just one damned thing after another.
— Elbert Hubbard
Yesterday Was H3ll
“Mohabbat palkon pe kiTne haseen khawaab sajaaTi hai..
Phoolon se mehakT khawaab..
SiTaron se jagmagaaT khawaab..
Shabnam se barasT khawaab..
Phir kabhi yun bhi hoT hai ki palko ki daaliyon se Khawaabon ke saare parinde ud jaaT hain..aur aankhein veeran si reh jaaTi hain”
Saare sapne kahin kho gaye..
Haaye hum kya se kya ho gaye..
Saare sapne kahin kho gaye..
Haaye hum kya se kya ho gaye..
Dil se Tanhaai ka dard jeeTa
Kya kahein hum pe kya kya na beeTa..
Dil se Tanhaai ka dard jeeTa
Kya kahein hum pe kya kya na beeTa..
Tum na aaye, magar jo gaye..
Haaye hum kya se kya ho gaye..
Saare sapne kahin kho gaye..
Haaye hum kya se kya ho gaye..
Tumne humse kahin Thi jo baaTein..
Unko dohraaTi hain gam ki raatein..
Tumne humse kahin Thi jo baaTein..
Unko dohraaTi hain gam ki raatein..
Tumse milne ke din To gaye..
Haaye hum kya se kya ho gaye..
Saare sapne kahin kho gaye..
Haaye hum kya se kya ho gaye..
Koi shikva na koi gila hai..
Tumse kab humko yeh gam mila hai…
Koi shikva na koi gila hai..
Tumse kab humko yeh gam mila hai…
Haan naseeb apne hi so gaye..
Haaye hum kya se kya ho gaye..
Saare sapne kahin kho gaye..
Haaye hum kya se kya ho gaye..
No matter how many Chances I give to a Sunday it keeps disappointing me
… I hate to be a part of this world on a Sunday….
when I was 12 I used to hate Sundays….all my frnds were like duh…its a
holiday tommorow…u suck (I mean they wont say U suck becos no one used
that beutiful language then). I wud wake up early arnd 6:30 and start rolling
in my bed….if I was not suppose to go to the BIIIIG grnd behind my house and
play Cricket…I wud be waiting for my mom to get up and get me going….I wud
smhow manage to bring it to 1:00 after rearranging my School Bag which I
loved to and then again go to bed after my so called Lunch …. then wud get up
and do the thing I just did … Curse this Sunday …..
yesterday evening it was miserable…I was waiting for a comment or talk from
Neelima …but she didnt turn up…then wat happens after a long frustrating
hour in CVIT-3 I go back to room after having dinner… there Yet another dumb
gal comes online, and as I had nuthing to do for the first time in like 2
years I try Yahoo Rooms …. so wat I generally do is I wait for someone to
join the room and start chatting with her or him b4 neone else does…. same
with this gal names Swati aka veronica_23….after like 10 mins we discover
that she is from hometown … but well, it was me who gave my hometown first
so there is no chance of my lying … but well she was not at all ready to
believe me … I dont know wats wrong with the gals … smtimes they just try
to be extra alert as if they are goin to be harrased online..sry if I m huting
smone but she was dumb….I dont care, so after she adds a ton to my
frustration, wat happens, she logged out….fine then I watched arnd 5
episodes of That 70’s Show …which is awesome man….I just love Eric (Smart
Mouth) and Dana (ahh she is kewl). well so that made it 2 in the nite…. and
then as I had no plans of working on my project thought of sleeping…. well
lets continue….I woke up at 11:00 I dont know how … I mean I dont like
getting up late but dood it rocks …. so change of plans … new time table
will allot 4AM – 12AM to sleep…..muhahahaha ….tadadadaa……so came to
lab arnd 11:30 and worked a bit on project…..fine feeling gud now …..
chal lets do some katli stuff….c ya bbye
Ppl post smthing so I can improve :((
Well I thought a lot and decided that just in case if I forget who all
used to read my blog and hence my BlogFriends….so I decided on riting
down the names of Mystery Men and Mysterious WoMen …. pls pls pls pls
forgive me for this but I wont remember later on … and pls pls pls dont
stop visiting …. I m sry….
The Trio — Rather 4 ……5 …. I dont KNOW how many X-(
Ranjitha
Simeen
Kiran
Arpita
Aditi…..
I dont know I mean tracked down most of them but now I m confused if Adi was
there …. neway …. pls comment na…..so I need not remember whos visiting
Tutor – Tutor
Kirti Garg
Yeah I know the grades are not out for SE … but well …
Hacker Guy
Praveen R
dont know wat to rite…..
do comment………
The Single Most Important Fact About Encodings
It does not make sense to have a string without knowing what encoding it uses. You can no longer stick your head in the sand and pretend that “plain” text is ASCII.
There Ain’t No Such Thing As Plain Text.
If you have a string, in memory, in a file, or in an email message, you have to know what encoding it is in or you cannot interpret it or display it to users correctly.
Almost every stupid “my website looks like gibberish” or “she can’t read my emails when I use accents” problem comes down to one naive programmer who didn’t understand the simple fact that if you don’t tell me whether a particular string is encoded using UTF-8 or ASCII or ISO 8859-1 (Latin 1) or Windows 1252 (Western European), you simply cannot display it correctly or even figure out where it ends. There are over a hundred encodings and above code point 127, all bets are off.
How do we preserve this information about what encoding a string uses? Well, there are standard ways to do this. For an email message, you are expected to have a string in the header of the form
Content-Type: text/plain; charset=”UTF-8″
For a web page, the original idea was that the web server would return a similar Content-Type http header along with the web page itself — not in the HTML itself, but as one of the response headers that are sent before the HTML page.
This causes problems. Suppose you have a big web server with lots of sites and hundreds of pages contributed by lots of people in lots of different languages and all using whatever encoding their copy of Microsoft FrontPage saw fit to generate. The web server itself wouldn’t really know what encoding each file was written in, so it couldn’t send the Content-Type header.
It would be convenient if you could put the Content-Type of the HTML file right in the HTML file itself, using some kind of special tag. Of course this drove purists crazy… how can you read the HTML file until you know what encoding it’s in?! Luckily, almost every encoding in common use does the same thing with characters between 32 and 127, so you can always get this far on the HTML page without starting to use funny letters:
But that meta tag really has to be the very first thing in the section because as soon as the web browser sees this tag it’s going to stop parsing the page and start over after reinterpreting the whole page using the encoding you specified.
What do web browsers do if they don’t find any Content-Type, either in the http headers or the meta tag? Internet Explorer actually does something quite interesting: it tries to guess, based on the frequency in which various bytes appear in typical text in typical encodings of various languages, what language and encoding was used. Because the various old 8 byte code pages tended to put their national letters in different ranges between 128 and 255, and because every human language has a different characteristic histogram of letter usage, this actually has a chance of working. It’s truly weird, but it does seem to work often enough that naïve web-page writers who never knew they needed a Content-Type header look at their page in a web browser and it looks ok, until one day, they write something that doesn’t exactly conform to the letter-frequency-distribution of their native language, and Internet Explorer decides it’s Korean and displays it thusly, proving, I think, the point that Postel’s Law about being “conservative in what you emit and liberal in what you accept” is quite frankly not a good engineering principle. Anyway, what does the poor reader of this website, which was written in Bulgarian but appears to be Korean (and not even cohesive Korean), do? He uses the View | Encoding menu and tries a bunch of different encodings (there are at least a dozen for Eastern European languages) until the picture comes in clearer. If he knew to do that, which most people don’t.
Leave a Comment
Comments (2)
Leave a Comment