Flash AS2: Setting text of textfield through code causes some characters to be deleted - actionscript-2

I have the following line of code to set the text of a Dynamic textfield:
boxCopy.text = 'Coming soon: 30th January 2014';
but when I compile the file, it shows as: 'Coming soon: 0th January 201'
I have no idea why this is. The font character set contains all the numeric characters, so it should display it.
Anyone got any ideas?
Thanks,
Stefan

So I figured out that embedding the font's Lowercase, Uppercase, Numeric and Punctauation charcters fixed the problem. Very strange behaviour through because if I typed it into the dynamic textfield in the scene view it worked fine.
Thought I'd keep this question here in case someone has the same issue.

Related

Scrapy: how to solve the "empty" item in html due to a foreign language symbol?

One of the scrapy-ed items seems contain no content in HTML. In MySQL database, it does have content including a non-regular - (dash) that is slightly longer. It could be a dash symbol from Chinese input, or something similar. I am copy it below, not sure whether it will keep the original form. The web link is here and this non-regular dash is in the title and the beginning of the description.
**Hospitalist – Chattanooga**
To further prove it, the export CVS file from MySQL convert this weird dash to ?€?. Most likely this weird symbol causes the non-display problem.
I want to either delete this weird symbol or replace it with a , or a regular dash. Where can it be done? During Scrapy? Or in MySQL? Sorry this is not a specific coding question. I need some guidance before figuring out any codes for this problem.
The long dash is called an EM dash fileformat - EM dash
The reason you are seeing it is likely due to the chosen encoding.
Try setting a different encoding or replacing the EM dash with the , sign as you mentioned in your question.
In php you can do so with the following code:
str_replace(chr(151), ',' $input);

Hebrew punctuation displayed incorrectly in Objective-C

I have the very basic line:
self.label.text = #",הם הכריחו אותה לשתות ויסקי";
Notice the comma at the left of the string. When this displays in a UILabel, I see the comma at the right. This is one example of punctuation problems I am seeing with Hebrew.
Any ideas for resolving this?
Most of the text you have is right-to-left, but a comma is left-to-right. You are displaying source code here as it is displayed by Xcode. It's not at all obvious what rules Xcode would choose to display such text. You would be much confident about what your source code is if you write
self.label.text = #"הם הכריחו אותה לשתות ויסקי" ",";
for example or
self.label.text = #"," "הם הכריחו אותה לשתות ויסקי";
so you know 100% sure what text you have in Xcode. After that I'm afraid it's very much a matter of reading the documentation and seeing what you need to do. While characters in text have some ordering, a text field on its own has a text ordering as well. You can have latin text with a bit of hebrew inside, or hebrew (right to left) text with a bit of latin inside, and they will behave differently.
What you describe looks like a left-to-right text field that is used to display some hebrew text, so the overall display order is left to right, but hebrew items inside (not the comma) are displayed right to left. You'd need to change the display order of the text field itself.
I've been reading up on Bi-directional text, it seems as though certain Unicode characters specify certain properties of the following text. Through experimentation, I've found that the Right-To-Left Isolate character, or U+2067 ⁧, will cause the text that follows to be displayed in the correct order. So the Objective C solution to the problem was:
self.label.text = [#"\u2067" stringByAppendingString: #",הם הכריחו אותה לשתות ויסקי"];

Negative dollars and iTextSharp

I am trying to assign a form field in a PDF through iTextSharp that has a negative dollar amount. The value is a simple string that starts with '-$'. Every time I add the value to the form using SetField, anything after the negative sing is lost. Positive dollar amounts are fine, only negative values are lost.
I am adding the value as such:
form.SetField(fieldName, fieldValue);
form is of type AcroFields, fieldName and fieldValue are both strings. I have traced down to the point where the string is being passed to SetFields, and its right there. I have also tried replacing '$' with the Unicode value to no avail. Am I supposed to escape the dollar sign? And if so, does anyone know what the escape character is?
I fixed the issue though I do not totally understand the cause. The field was defined as a multi-line text box even though it was being used as a single line. I unchecked the option for the box to be multi-line and the issue went away.

Unwanted space in a PDF generated with TCPDF

We use TCPDF to generate PDFs. In one special case I got a strange behaviour, it looks like TCPDF puts a space inbetween two characters.
I use the cid0cs as font, the strange behaviour appears if I place "µg" in the PDF, it looks like "µ g" (with some space inbetween) now.
I edited the cid0cs.php on index 181 (like here: http://bytethinker.com/blog/correct-display-of-imported-fonts-in-tcpdf) with no success.
Any help is really appreciated.
Did you edit the character µ or g? If you select the letters you can see which letter the extra space belongs to. So... for a small "g" (the first letter after which is the space, you must edit the entry "130=>???" of the $cw array.
$cw=array(0=>0,1=>750,2=>750,3=>750,4=>750
Make it half the value. If its 750, make it 400 and try. Or even better: search for a letter that could be the same with as your "g" (an "a" for example).
Cheers,
Guido
(customer service is when you look at all the links that lead to your website :)

Cocoa Interface Builder - Number Formatter Bug?

I am trying to put in a range using a Number Formatter component added to a text file. The problem occurs when I input a consistent sequence of number '9'. The field will keep on adding to what is in there ( i .e. 99999999999) up to a 10th number, and then the field will be changed to a random 6 digit number?
Is that a bug with the Number Formatter? Any workarounds?
Also, can I create my own number formatter? That would be the best if a bug does exist I think.
Thanks!
I have tried the same thing on another version of Xcode and it seems to works fine.. Maybe a problem with that version's number formatter..
Thanks for your help.