Hi All,
"20B9 " this is my hex Symbol, I want to convert this into a currency
Symbol but i dont know how?
···
--
*Indrajeet Mishra*
*Software Developer (Ruby on Rails)*
*Mob: +919987816826*
*skype ID: indrajeet.mishra2*
Hi All,
"20B9 " this is my hex Symbol, I want to convert this into a currency
Symbol but i dont know how?
--
*Indrajeet Mishra*
*Software Developer (Ruby on Rails)*
*Mob: +919987816826*
*skype ID: indrajeet.mishra2*
You could also use "\u20b9".
On Mon, Aug 31, 2015, Frederic Branczyk wrote:
Have you tried something like this?
["20B9".to_i(16)].pack('U')
On Mon, Aug 31, 2015 at 2:14 PM, Indrajeet Mishra < > indrajeetmishra7590@gmail.com> wrote:
> Hi All,
>
>
> "20B9 " this is my hex Symbol, I want to convert this into a currency
> Symbol but i dont know how?
--
Eric Christopherson
Have you tried something like this?
["20B9".to_i(16)].pack('U')
On Mon, Aug 31, 2015 at 2:14 PM, Indrajeet Mishra < indrajeetmishra7590@gmail.com> wrote:
Hi All,
"20B9 " this is my hex Symbol, I want to convert this into a currency
Symbol but i dont know how?--
*Indrajeet Mishra**Software Developer (Ruby on Rails)*
*Mob: +919987816826 <%2B919987816826>*
*skype ID: indrajeet.mishra2*
Thanks
@Frederic Branczyk
On Mon, Aug 31, 2015 at 5:53 PM, Frederic Branczyk <fbranczyk@gmail.com> wrote:
Have you tried something like this?
["20B9".to_i(16)].pack('U')
On Mon, Aug 31, 2015 at 2:14 PM, Indrajeet Mishra < > indrajeetmishra7590@gmail.com> wrote:
Hi All,
"20B9 " this is my hex Symbol, I want to convert this into a currency
Symbol but i dont know how?--
*Indrajeet Mishra**Software Developer (Ruby on Rails)*
*Mob: +919987816826 <%2B919987816826>*
*skype ID: indrajeet.mishra2*
--
*Indrajeet Mishra*
*Software Developer (Ruby on Rails)*
*Mob: +919987816826*
*skype ID: indrajeet.mishra2*
Definitely. I thought OP meant to have the hex string as an input and
expects the unicode symbol as an output. If the goal is simply the single
symbol then I would prefer your answer.
On Mon, Aug 31, 2015 at 8:15 PM, Eric Christopherson < echristopherson@gmail.com> wrote:
On Mon, Aug 31, 2015, Frederic Branczyk wrote:
> Have you tried something like this?
>
> ["20B9".to_i(16)].pack('U')
>
> On Mon, Aug 31, 2015 at 2:14 PM, Indrajeet Mishra < > > indrajeetmishra7590@gmail.com> wrote:
>
> > Hi All,
> >
> >
> > "20B9 " this is my hex Symbol, I want to convert this into a currency
> > Symbol but i dont know how?You could also use "\u20b9".
--
Eric Christopherson
Definitely. I thought OP meant to have the hex string as an input and
expects the unicode symbol as an output. If the goal is simply the single
symbol then I would prefer your answer.
Oh, right. In that case, one can also do
0x20b9.chr(Encoding::UTF_8)
in Ruby 2.2. I would have thought #chr without argument would assume
UTF-8 out of the box, but for me at least, it still only accepts 8-bit
values (ASCII-8BIT?)
On Mon, Aug 31, 2015, Frederic Branczyk wrote:
On Mon, Aug 31, 2015 at 8:15 PM, Eric Christopherson < > echristopherson@gmail.com> wrote:
> On Mon, Aug 31, 2015, Frederic Branczyk wrote:
> > Have you tried something like this?
> >
> > ["20B9".to_i(16)].pack('U')
> >
> > On Mon, Aug 31, 2015 at 2:14 PM, Indrajeet Mishra < > > > indrajeetmishra7590@gmail.com> wrote:
> >
> > > Hi All,
> > >
> > >
> > > "20B9 " this is my hex Symbol, I want to convert this into a currency
> > > Symbol but i dont know how?
>
> You could also use "\u20b9".
>
> --
> Eric Christopherson
>
--
Eric Christopherson