blackberry / BB10-WebWorks-Framework

The BB10 WebWorks Framework is packaged within an application BAR file to run on a BB10 device (or simulator)
60 stars 34 forks source link

Encoding Problem with CalendarComposerCard & blackberry.pim.calendar.createEvent #663

Closed splatterb0y closed 11 years ago

splatterb0y commented 11 years ago

Hi guys,

I have the following problem with the two methods mentioned in the Issue title. I use a ID from the DOM to create an event summary and pass it into one of these function. The problem is that special chars like "öäüß" are getting scrambled and not get displayed like they should in the card or the created event.

Here is the sample I provided @lsale with, but maybe wants to look into it to. Because I know Luca is crazy busy with traveling and stuff.

https://github.com/splatterb0y/BB10-CalenderEncodingError

In my application the only difference is that the content of the DIV gets set from JavaScript and is later read from JavaScript to pass it into the CalendarComposerCard but I encounter the same problems with the encoding. In the sample the text already resides in the div when the application starts.

I tried blackberry.pim.calendar.createEvent as work around but this API is suffering from the same encoding error. I guess this is somehow related to the calendar itself maybe.

Cheers Christian

rwmtse commented 11 years ago

I might have a fix for create event, I fixed the encoding problem in contacts. The same fix should apply in calendar.

Sent from my BlackBerry 10 smartphone on the Rogers network. From: Christian Ziegenrücker Sent: Wednesday, May 29, 2013 8:57 AM To: blackberry/BB10-WebWorks-Framework Reply To: blackberry/BB10-WebWorks-Framework Subject: [BB10-WebWorks-Framework] Encoding Problem with CalendarComposerCard & blackberry.pim.calendar.createEvent (#663)

Hi guys,

I have the following problem with the two methods mentioned in the Issue title. I use a ID from the DOM to create an event summary and pass it into one of these function. The problem is that special chars like "öäüß" are getting scrambled and not get displayed like they should in the card or the created event.

Here is the sample I provided @lsalehttps://github.com/lsale with, but maybe wants to look into it to. Because I know Luca is crazy busy with traveling and stuff.

https://github.com/splatterb0y/BB10-CalenderEncodingError

In my application the only difference is that the content of the DIV gets set from JavaScript and is later read from JavaScript to pass it into the CalendarComposerCard but I encounter the same problems with the encoding. In the sample the text already resides in the div when the application starts.

I tried blackberry.pim.calendar.createEvent as work around but this API is suffering from the same encoding error. I guess this is somehow related to the calendar itself maybe.

Cheers Christian

— Reply to this email directly or view it on GitHubhttps://github.com/blackberry/BB10-WebWorks-Framework/issues/663.


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

splatterb0y commented 11 years ago

Alright then I would happy if you share this fix with me @rwmtse .

rwmtse commented 11 years ago

@splatterb0y Take a look at this pull request: https://github.com/blackberry/BB10-WebWorks-Framework/pull/660

rwmtse commented 11 years ago

@splatterb0y For calendar composer card, I have started a pull request in webplatform (internal GitHub so I won't post the link)

splatterb0y commented 11 years ago

@rwmtse So this problem will persists till a new SDK Update?

bryanhiggins commented 11 years ago

@splatterb0y you can pick up the createEvent change directly from GitHub if you don't want to wait for SDK release

The change for the card is on device, so unfortunately that won't be available until a future OS update. That is really just a convenience API though. You should be able to use blackberry.invoke.invoke on target 'sys.pim.calendar.viewer.eventcreate' with action 'bb.calendar.CREATE'

splatterb0y commented 11 years ago

@bryanhiggins Well the blackberry.calendar.createEvent is having the same problem with the encoding.

I will try with the direct invoke approach.

So building the webworks framework with the pull request included into this issue will not fix my problem? :( Is this something that gets fixed in a minor or major version? I mean will this fix be in 10.1.(buildId over 2542) or 10.2?

bryanhiggins commented 11 years ago

@splatterb0y Building the framework with the pull request included should fix encoding for blackberry.calendar.createEvent. You only need to replace the calendar extension in the SDK.

For card invocation, you'll need to use blackberry.invoke.invoke directly. I can't tell you at this time what version of the OS @rwmtse 's patch will be included in.

splatterb0y commented 11 years ago

@bryanhiggins Applying the commit of @rwmtse to the current version of WebWorks does the Job for blackberry.calendar.createEvent but not for the CalenderComposerCard, which is no problem for me because I am just using the createEvent Method.

You can close this issue from my perspective, but I dont know how you guys handle closing issues this is why I am not doing it myself.

bryanhiggins commented 11 years ago

@splatterb0y glad to hear that patch works for you

We shall track the OS issue internally.