Caesar Cipher in Java (Spanish Characters) -


I have read, and I was wondering if there is any way to consider the full range of characters? For example, "á", "é", "ö", "ñ", and "" ([space]) are not considered? (For example, my string is "Hello World", and the standard result is "hoof # zurug"; I want to erase that "#", so the result will be "hoarsegroog")

I'm sure That my answer is in this part of the code:

  if (c> = 32 & amp; amp; amp; c & lt; = 127) {// life Change the base to make it easier, and use a // to clarify anxiety intensely ... after int x = c - 32; X = (X + shift)% 96; Character [m] = (four) (x + 32); }  

But I have tried some things, and it does not work.

Look at this pseudo - must be implemented nicely:

  // You must define your category, obviously - it is not quite clear that the example "Ź" should be included and this "z" array char_range = ['a', 'á', ' B ',' c ',' č ', (...),' z ',' Ź ',' ž '] // Text to encode text string format Text' some text here '// contains encoded text Stringbuilder ciphertext = '' // classic Ijhr Cypher will be written on the right side of the 3 characters / understanding, signed Intret shift_by = 3 // Note: character! = Byte, esp for each letter in UTF-8 (1 axis can not be in 1 or more bytes) Character qualification is found in plain text char_range // eg "A" will return to 0 if not char_range // eg Spaces and other non-letters, nothing / / drop characters // Optionally, you can add it to continue with the next character with the shift_by addition to character_position if character_position & gt; Char_range.length character_position modulo char_range.length if the character_position is & lt; 0 // Use useful char_range.length for decoding, get new_character in character_position in character_position, new_character is added for cyprotect  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -