GithubHelp home page GithubHelp logo

Comments (18)

ianbjacobs avatar ianbjacobs commented on August 12, 2024 1

@mountielee and I discussed further. I believe the concern is about what happens in this situation:

  • payment request API is called in a context with character encoding A
  • the data is handed to a web-based payment app that uses character encoding B

My assumption is that browsers manage this sort of translation from one encoding context to another. I would ask browser vendors to weigh in on whether they foresee any issues.

Ian

cc @ r12a

from webpayments.

ianbjacobs avatar ianbjacobs commented on August 12, 2024

@mountielee,

I don't believe that payment request API specifies any encoding. I believe the surrounding context (e.g., HTML) is where the character set is defined, and one can specify different character encodings.

Am I missing something?
Ian

from webpayments.

mountielee avatar mountielee commented on August 12, 2024

at PaymentItems dictionary, product name can be included which are from
merchant can be encoded as non-unicode charset.
at PaymentAddress interface, languageCode is defined but that is not
enough, the merchant possibly will receive broken shipping address.

2016년 9월 23일 (금) 오전 10:53, ianbjacobs [email protected]님이 작성:

@mountielee https://github.com/mountielee,

I don't believe that payment request API specifies any encoding. I believe
the surrounding context (e.g., HTML) is where the character set is defined,
and one can specify different character encodings.

Am I missing something?
Ian


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#181 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADvzYLwwNcc_mXC78D2aSdg0vo6Rkd1sks5qs6GggaJpZM4KEy6W
.

from webpayments.

ianbjacobs avatar ianbjacobs commented on August 12, 2024

@mountielee,

I think Unicode is a requirement on the Web, but different character encodings may be used within a <script> element; see https://www.w3.org/TR/html5/scripting-1.html#the-script-element

Ian

from webpayments.

mountielee avatar mountielee commented on August 12, 2024

@ianbjacobs

I know unicode is recommended.
but considering adaptation of web payments, we can not ignore page encoding.
I believe over 10 billions of peoples are influenced
and that is the reason browser vendors are sill supporting non-unicode encodings.

from webpayments.

ianbjacobs avatar ianbjacobs commented on August 12, 2024

@mountielee,

I don't believe this is a discussion for this group. I believe HTML and JavaScript provide the necessary character encoding support. If they don't, the problem needs to be addressed there and not in our API.

Ian

from webpayments.

mountielee avatar mountielee commented on August 12, 2024

@ianbjacobs

if the merchant use this type of code
<script type="application/javascript" src="paymentrequest.js" charset="GBK"></script>

can we image payment app is able to handle well?

from webpayments.

rsolomakhin avatar rsolomakhin commented on August 12, 2024

@mountielee Do you have an example website that uses non-unicode encoding and uses PaymentRequest? I'd like to see how it ends up working. I have a hunch that this will be largely a non-issue (or easily fixable).

from webpayments.

ianbjacobs avatar ianbjacobs commented on August 12, 2024

@mountielee, web-based payment apps would handle encoding properly. We don't exercise any control over how native-based payment apps would work.

Ian

from webpayments.

mountielee avatar mountielee commented on August 12, 2024

@ianbjacobs
even well prepared web-based payment apps,
when they received payment request in broken characters, they have no way
to fix it.

web payment standard will encourage many small and non-technical merchants
using web payments.
when merchants receive broken shipping address (we already experienced this
case),
merchants have no way to fix it.

that is the reason charset attribute is added in script tag as part of
standard.

so if merchant is using non-unicode page encodings, with current
expectations, web payment will not work well.

2016년 9월 23일 (금) 오전 11:53, ianbjacobs [email protected]님이 작성:

@mountielee https://github.com/mountielee, web-based payment apps would
handle encoding properly. We don't exercise any control over how
native-based payment apps would work.

Ian


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#181 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADvzYAO_WrVIeHTneZUQqSwQKFwM_KbQks5qs6-PgaJpZM4KEy6W
.

from webpayments.

mountielee avatar mountielee commented on August 12, 2024

@ianbjacobs @rsolomakhin
I draw example sequence diagrams : https://goo.gl/alwYT7
the example merchant can be taobao.com or rakuten.co.jp those are biggest merchant in China and Japan.

from webpayments.

mountielee avatar mountielee commented on August 12, 2024

@ianbjacobs
this is the current solution I use : https://goo.gl/rC4f7T
in a single browser context, I don't know how to convert charsets in a context inside without server assistance

from webpayments.

rsolomakhin avatar rsolomakhin commented on August 12, 2024

@mountielee Thank for the diagrams. That clarifies your question more. Can you stand up an actual server that calls PaymentRequest with non-unicode strings? See samples for example. These samples work in Chrome for Android.

from webpayments.

webpayments avatar webpayments commented on August 12, 2024

I will prepare sample after back to Korea at next week.

2016년 9월 23일 (금) 오후 1:41, Mountie Lee [email protected]님이 작성:

@ianbjacobs https://github.com/ianbjacobs
this is the current solution I use : https://goo.gl/rC4f7T
in a single browser context, I don't know how to convert charsets in a
context inside without server assistance


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#181 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/APFrHMXp3LxcxGQ_5vexPcXP4BqDinqsks5qs8iDgaJpZM4KEy6W
.

from webpayments.

adrianba avatar adrianba commented on August 12, 2024

We've discussed this before. All strings in JavaScript are encoded in UTF-16. When resources are loaded over the network or from files the correct encoding must be specified. This allows the browser to convert from the encoded text into UTF-16. All browser APIs that operate on strings use UTF-16.

Needing to use a mechanism such as https://goo.gl/rC4f7T suggests that an incorrect charset is specified when data is read by the browser. If you don't indicate the correct encoding for data then it will never work correctly but properly tagged data will work automatically.

Here is how it works with the encode/decode steps shown: http://go4a.de/2cqTj46

from webpayments.

mountielee avatar mountielee commented on August 12, 2024

I have prepared EUC-KR encoded payment page.
https://devapi.paygate.net/orderforms/credit_cards_euckr.html
seams works well.
so the payment mediator convert encodings.

from webpayments.

ianbjacobs avatar ianbjacobs commented on August 12, 2024

Closing as there has not been activity lately and in light of the response from Adrian.

from webpayments.

webpayments avatar webpayments commented on August 12, 2024

from webpayments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.