Ruby could recognize the values when putting into a webpage text filed

Hi,

I have some values in my Excel as below:

1136-ΑΓΙΩΝ ΑΝΑΡΓΥΡΩΝ
1137-ΑΙΓΑΛΕΩ

But with script when I am putting those into a webpage filed, they are
saving into the field as below:

136-αΓ?Ω? α?α?Γ??Ω?
1137-α?Γα?εΩ

Any idea how to fix the same ?

···

--
Posted via http://www.ruby-forum.com/.

set encoding or use a diff font package?

···

On Mon, Feb 4, 2013 at 10:52 PM, Love U Ruby <lists@ruby-forum.com> wrote:

Hi,

I have some values in my Excel as below:

1136-ΑΓΙΩΝ ΑΝΑΡΓΥΡΩΝ
1137-ΑΙΓΑΛΕΩ

But with script when I am putting those into a webpage filed, they are
saving into the field as below:

136-αΓ?Ω? α?α?Γ??Ω?
1137-α?Γα?εΩ

Any idea how to fix the same ?

--
Posted via http://www.ruby-forum.com/\.

Can anyone help me here? This is the thing sucking my whole script to
stop. I need to update 500 values on the webpage. I am using windows -
XP.

Thanks

···

--
Posted via http://www.ruby-forum.com/.

how do you read the csv file?
have you maybe thought about that the encoding may be wrong?
what ruby version do you using?

···

--
Posted via http://www.ruby-forum.com/.

Colby Callahan wrote in post #1095280:

set encoding or use a diff font package?

Didn't get you. Which package you are asking me to refer? I used
selenium-web driver for my scripts at all.

Thanks

···

--
Posted via http://www.ruby-forum.com/\.

Hans Mackowiak wrote in post #1095331:

how do you read the csv file?
have you maybe thought about that the encoding may be wrong?
what ruby version do you using?

I am using Ruby 1.9.3 latest version. I am using win32ole library with
Excel - 2010.

until number_of_list_values == 0

  number_of_list_values = number_of_list_values - 1
  element = driver.find_element :id => "codeExt"
  element.send_keys wbs.cells(rows,2).value
  element = driver.find_element :id => "descriptionExt"
  element.send_keys wbs.cells(rows,3).value
  driver.find_element(:name, "btnSaveandNew").click if
number_of_list_values != 0
  wbs.cells(rows,5).value = "done"
  rows = rows + 1
  driver.find_element(:name, "btnSave").click if number_of_list_values
== 0

end

···

--
Posted via http://www.ruby-forum.com/\.

I am just saying that the browser thinks the information it is receiving is
of encoding type X while the server/program is sending encoding type Y.
e.g. ruby sends UTF-8, but excel 2010 is encoded with ANSI by default (i
think). This would mean that your special characters are not going to be
available. Program sends I know of only two reasons why it would not be
able to properly read or display any character (not specific to ruby or any
language): Encoding Mismatch or Missing Fonts. My guess is encoding. e.g
This may help with checking/changing your encoding.

Class: Encoding (Ruby 1.9.3) (checking encoding
within ruby)
http://www.surveygizmo.com/survey-software-support/tutorials/getting-started/how-to-encode-an-excel-file-to-utf-8-or-utf-16/
(specifically how to change excel encoding)

Hope that helps...

···

On Tue, Feb 5, 2013 at 6:28 AM, Love U Ruby <lists@ruby-forum.com> wrote:

Hans Mackowiak wrote in post #1095331:
> how do you read the csv file?
> have you maybe thought about that the encoding may be wrong?
> what ruby version do you using?

I am using Ruby 1.9.3 latest version. I am using win32ole library with
Excel - 2010.

until number_of_list_values == 0

  number_of_list_values = number_of_list_values - 1
  element = driver.find_element :id => "codeExt"
  element.send_keys wbs.cells(rows,2).value
  element = driver.find_element :id => "descriptionExt"
  element.send_keys wbs.cells(rows,3).value
  driver.find_element(:name, "btnSaveandNew").click if
number_of_list_values != 0
  wbs.cells(rows,5).value = "done"
  rows = rows + 1
  driver.find_element(:name, "btnSave").click if number_of_list_values
== 0

end

--
Posted via http://www.ruby-forum.com/\.

Colby Callahan wrote in post #1095383:

I am just saying that the browser thinks the information it is receiving
is
of encoding type X while the server/program is sending encoding type Y.
e.g. ruby sends UTF-8, but excel 2010 is encoded with ANSI by default
(i
think). This would mean that your special characters are not going to
be
available. Program sends I know of only two reasons why it would not be
able to properly read or display any character (not specific to ruby or
any

But in excel column those values are quite OK,only the problem is when
program reading the excel column by the above program, something wrong
happened. definitely it is encoding problem. So in my code doing some
change- can you guide me?

···

--
Posted via http://www.ruby-forum.com/\.

But in excel column those values are quite OK,only the problem is when
program reading the excel column by the above program, something wrong
happened. definitely it is encoding problem. So in my code doing some
change- can you guide me?

Do you ever read ANY of the links people provide?

I'm sure I'm not the only one, but why is it you seem to want people to spoon
feed you everything? You're right, you have an encoding issue.

You have some sample Excel data that comes into Ruby incorrectly, so now try
stuff! Go read the encoding links provided, you'll find there's a very elegant
way in Ruby to take the existing encoding and change it. Run a few tests.
Reencode the incoming string with multiple encoding methods. Look at the output,
When you see the one that fixes your issue you'll know exactly what to do.

Wayne