PDFDate format for UTC in iTexPDFt and iTextSharp - itext

In iTextPDF 5.5.8 for Java when creating a PDFDate in UTC timeZone, I get the following format:
(D:20160212073102Z)
Whereas in iTextSharp (older version) I get for UTC the format:
(D:20160212082328+00'00')
While Adobe Reader can handle both Versions, one of our Adobe Acrobat Signing plugins requires the first Version and can not handle +00'00' (it accepts +01'00' though).
Now my question: Does anyone know, how we could make iTextSharp produce the first Version? (D:20160212073102Z)
Thank you

The format you show for the older iTextSharp version
(D:20160212082328+00'00')
is wrong, the specification clearly says:
A PLUS SIGN as the value of the O field signifies that
local time is later than UT, a HYPHEN-MINUS signifies that local time is earlier than UT, and the LATIN
CAPITAL LETTER Z signifies that local time is equal to UT
Thus, the Z form has to be used for UTC.
Thus, you had better try and update to the current iTextSharp and test again. If there still is the wrong form, update your question accordingly. Such a bug would surely be fixed soon.

Related

less is not displaying what it considers as unassigned utf8 unicode characters

Not a question but a small contribution, since I was not finding the information anywhere.
The problem appears even with a proper utf8 locale with "older" versions versions of less.
If you cannot update to a version of less correcting the issue, I found a workaround :
export LESSUTFBINFMT=*n%C
this instructs less to process any Unicode code points that were successfully decoded and display them with normal attributes (*n) and as-they-are (%C).
Notes:
I found the %C format by trial-and-error, I didn't find it explicitly documented.
I found this description of the issue : redhat bug 1074489
It mentions a newer version of less solving it in 2014, but I still run into this problem with a less-458-9.el7 from 2018.

Qt5: date format MMM, in Spanish, remove point

In Qt5, the MMM format, which displays the month name in a short format (e.g., "Dec" instead of "12" or "December"), when using it for the Spanish locale, shows the abbreviated month name with a dot at the end, for example, for, "25th December 2016", in MMM/dd/yyyy format, shows "Dic./25/2016".
The problem is when editing. For displaying a date, it's ok, since it's what the Spanish rules say, but it isn't suitable for editing. I'm forced to position the cursor just after the point, at the end of the month part, to delete the point, and then, the rest of the month name. If I try to put the cursor just before the point, to edit just the month name part, the field is in "read-only" mode. I can't not remove anything, unless I remove everything from the very right of the line and back, character to character (or just selecting the whole month part and remove everything).
Besides, the point is not autocompleted. So, if the user writes the new month forgetting the dot, the edition is rejected and fall backs to the original value.
Taking all of it into account, editing a QDateEdit is a bit cumbersome (in Spanish).
I don't know if it is the built-in QDateEdit behaviour, or internally it is using a QRegExpValidator, but in that case, I don't know what it's the regexp expression, to personalize it from it.
In short, how can I "solved" it? (the cumbersome edition; it's ok for me both, removing the dot, or changing the validation).
The Qt 5 behavior is correct and there's nothing Qt can do (or should do). The only correct and acceptable short name of December in a es_ES locale is "dic.", trailing dot included. That's what CLDR says:
http://www.unicode.org/cldr/charts/30/summary/es.html#1636
http://www.unicode.org/cldr/charts/30/verify/dates/es.html

Formatting a java.util.Date through xsl built-in funciotn "format-dateTime" displays language

I'm using an xslt transformation to format a Java object to pdf through Apache FOP libraries.
In particular I want to format a field of my object, a java.util.Date into DD/MM/YYYY format. To be able to format using built-in function "format-dateTime" I set xslt version to 2.0 and switched the transformation processor to saxon-8.7 because xalan did not support version 2.0, then I added in the xslt the date formatting instruction as follows:
Value date: <xsl:value-of select="format-dateTime(valueDate, '[D01]/[M01]/[Y0001]') " />
before starting the transformation, I printed the Date field to stdout to be sure it was valued correctly in the input object:
valueDate: Thu Jan 01 01:00:00 CET 1970
And that's what I expected.
But in the output text, after the xsl transformation, appears an undesired "language" information that precedes the (correctly formatted) date.
[Language: en]01/01/1970
Someone knows why?
Why did you choose Saxon 8.7? It's a very old release, it actually predates the XSLT 2.0 recommendation of January 2007. The current release is 9.5.
I think you will find this goes away if you use a more recent release. However, it could still happen if your Java configuration has a default Locale which is a language that Saxon does not support. (The message indicates that Saxon has chosen to output the date in English despite this not being the language you requested, which is implicitly your default language).
If moving to a more recent release fails to solve the problem, try setting the language argument of format-date to the string "en".

My dollar signs are now little boxes

This week we upgraded to JasperReports Server 4.7 (Professional) and iReport 4.7. I have several reports that I created in iReport 4.5.1 and successfully used in JasperReports Server 4.5.1.
After the upgrade, all of my dollar signs are now little boxes. The pattern for my currency fields is ¤ #,##0.00. JasperReports Server is not replacing the box with a dollar sign when the report is generated. Everything looks ok in the pattern sample. My percentage symbols are all still working. I tried removing and applying the currency pattern to the fields again, but this didn't fix the problem.
Any thoughts on how I can fix this?
This is Java operating as intended... but not as you want it to operate. Your locale does not specify a currency, so you get that "¤" symbol.
You could workaround it by changing your locale from "en" to "en_US". I just did this last week. As a side note, I found one tweak that I needed to make. After changing the locale to en_US I needed to copy one file like this:
cp .../jasperserver-pro/scripts/jquery/js/jquery.ui.datepicker-en.js .../jasperserver-pro/scripts/jquery/js/jquery.ui.datepicker-en-US.js
Alternatively, I usually find it's better to work around it by setting your format mask to use a hard-coded dollar sign. If you are displaying "$50.00" to a user in the United States, it would be nonsensical to display "€50,00" to a European user or "¥50.00" to a Japanese user for the same value. There are lots of times when the hard-coded currency symbol is more appropriate.

Input utf-8 characters in management studio

HI,
[background]
We currently build files for many different companies. Our job as a company is basically to sit in between other companies and help with communication and data storage. We have begun to run in to encoding issues where we are receiving data encoded in one format but we need to send it out in another. All files were prevsiously built using the .net framework default of UTF-8. However we've discovered that certain companies cannot read utf-8 files. I assume because they have older systems that require something else. This becomes apparent when sending certain french charaters in particular.
I have a solution in place where we can build a specific file for a specific member using a specific encoding. (While I understand that this may not be enough, unfortunately this is as far as I can go at the moment due to other issues.)
[problem]
Anyways, I'm at the testing stage and I want to input utf-8 or other characters into management studio. Perform an update on some data and then verify that the file is built correctly from that data. I realize that this is not perfect. I've already tried programatically reading the file and verifying the encoding by reading preambles etc. So this is what I'm stuck with. According to this website http://www.biega.com/special-char.html ... I can input utf-8 characters by clicking ALT+&+#+"decimal representation of character" or ALT+"decimal representation of character" but when I use the data specified by the table I get completely different characters in management studio. I've even saved the file in a utf-8 format using management studio by clicking the arrow on the save button in the save dialog and specifying the encoding. So my question is how can I accurately specify a character that will end up being the character I'm trying to input and actually put it in the data that will then be put in a file.
Thanks,
Kevin
I eventually found the solution. The website doesn't specify that you need to type ALT+0+"decimal character representation". The zero was left out. I'd been searching for this for ages.