Whee for JTextFields SCREWING UP.
I've got a beautiful simple encrypter/decrypter that uses an 8-digit hexidecimal value (12 decimal value). It works great, oh so fast. Much faster than anything in GM.To put it nicely, it encrypted a 5mB file in less than a second.Unfortunately, there is a highly annoying problem when it comes to saving the encrypted file - when it saves the file, it saves differently from as if you copied and pasted.So, if I copy/paste into one txt file, and save that, and then also save from my program, the two files are different.*pulls hair*So I am currently reduced to copy/paste until I fix this problem.I proudly present Hamlet's Soliloquy, the first bit anyway:IBONHW?%w-ozAB‘©WÇÈ°]Xâ„¢ÛÇ?O¥Å¾Œ8¾È?á*'O fV“â€?z€ŸkLâ„¢ÛØ)?šýynUUV+5"™ââ€â€?I0ëÚÖ¦œÃ…Lýõ÷ÅÅFSJâ€?‰â€ ?Ãâ€?îëQJØ…©¶Ã?VgY¨6ðx~MKCI *x¾dgÃ?°§â„¢ÃžCñÃâ€?Ã?Q¥Ã²Ã¼'â´Å‚ˆˆÃ‰Ã¤ÃžNSÕÖg¨Ã‰UQ¹ï©–â€? /9ÝëO†+!"d8ß01ðï´ª/("g1'Ã¥9ðú{õ)‘B[`~E0„˜I¬¥Ã‡Ã‡Ãˆ*浜Ÿ'ïPÀÊqRµÂ®˜˜Ã¥â€¢=?&>YÇî÷â€?:!N ìý¡Ž J½þðæ?“ à 4ÉÃ?–â€?ãðÓ†<=_N!ÕƺdlZ¤±ªÂ¹HNà îÅ}AKU?rv´bþ¿±4Úäq²â%‚?HJUU1Ã?lKlßØåäERi½‘BÃ?Ã?ÂakÃêá«HAMLET: To be, or not to be–that is the question:Whether 'tis nobler in the mind to sufferThe slings and arrows of outrageous fortuneOr to take arms against a sea of troublesAnd by opposing end them. To die, to sleep–No more–and by a sleep to say we endQhe heartache, and the thousand natural shocksThaq flesh is heir to. 'Tis a consummationDevoutly to be wished.So I can copy/paste that to notepad, and vice versa, and it works, but it writes-to-file funny. I could save the entire things as hexidecimal code, but that doubles the filesize.I am betting it has to do with ANSI/Unicode problems.———————————–No more html linebreaks.Hoorah! Further testing shows that my filewrite doesnt write properly, for some reason! I opened a JPG image, and just resaved it, and iit screwed up completely!This is a GOOD thing because I know partially what the problem is.
Sorry dude, I'd love to help, but I know nothing about Java. :P
Still, 5mb in less than a second. w00tness.
Damn ASCI/Unicode.I'm probably going to have to have it make a *.ctx custom format with binary code or something horrible.If I create the original text in the program, it can save and decrypt fine, but encoding screws it up.Bleh.That encrypted poem is beautiful.
How are you saving it? The only way I've really tried is using a BufferReader with a FileWriter.
I hate Java. If it runs in my browser, it will close the browser. So I never use it. And never did either.
//How are you saving it? The only way I've really tried is using a BufferReader with a FileWriter.//
Same - I think it is whitespace chars messing it up - carriage returns, etc.I very much dislike Java. I don't feel like giving reasons.
Hali everybody hates java. but in reality… if more languages had the same syntax as java everything would be easier…
Actually, the first bit is a 0…