Index: xml-fop/src/java/org/apache/fop/fo/PropertyManager.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/java/org/apache/fop/fo/PropertyManager.java,v
retrieving revision 1.24
diff -w -u -r1.24 PropertyManager.java
--- xml-fop/src/java/org/apache/fop/fo/PropertyManager.java	27 Feb 2004 17:57:40 -0000	1.24
+++ xml-fop/src/java/org/apache/fop/fo/PropertyManager.java	5 Apr 2004 15:54:20 -0000
@@ -494,6 +494,9 @@
             textInfo.textTransform
                     = this.propertyList.get(PR_TEXT_TRANSFORM).getEnum();
 
+            textInfo.hyphChar = this.propertyList.get(
+                                  PR_HYPHENATION_CHARACTER).getCharacter();
+
         }
         return textInfo;
     }
Index: xml-fop/src/java/org/apache/fop/fo/TextInfo.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/java/org/apache/fop/fo/TextInfo.java,v
retrieving revision 1.6
diff -w -u -r1.6 TextInfo.java
--- xml-fop/src/java/org/apache/fop/fo/TextInfo.java	27 Feb 2004 17:57:40 -0000	1.6
+++ xml-fop/src/java/org/apache/fop/fo/TextInfo.java	5 Apr 2004 15:54:21 -0000
@@ -50,8 +50,8 @@
     /** fo:letter-spacing property */
     public SpaceVal letterSpacing;
 
-    /** can this text be hyphenated? */
-    public boolean bCanHyphenate = true;
+    /* the hyphenation character to be used */
+    public char hyphChar = '-';
 
     /** fo:text-decoration property: is text underlined? */
     public boolean underlined = false;
Index: xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java,v
retrieving revision 1.17
diff -w -u -r1.17 LineLayoutManager.java
--- xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java	2 Apr 2004 10:38:29 -0000	1.17
+++ xml-fop/src/java/org/apache/fop/layoutmgr/LineLayoutManager.java	5 Apr 2004 15:54:27 -0000
@@ -20,6 +20,7 @@
 
 import org.apache.fop.datatypes.Length;
 import org.apache.fop.fo.PropertyManager;
+import org.apache.fop.fo.Constants;
 import org.apache.fop.fo.properties.CommonMarginBlock;
 import org.apache.fop.fo.properties.CommonHyphenation;
 import org.apache.fop.layout.hyphenation.Hyphenation;
@@ -209,7 +210,7 @@
 
                     // This break position doesn't fit
                     // TODO: If we are in nowrap, we use it as is!
-                    if (bTextAlignment == TextAlign.JUSTIFY || prevBP == null) {
+                    if (hyphProps.hyphenate == Constants.TRUE) {
                         // If we are already in a hyphenation loop, then stop.
 
                         if (inlineLC.tryHyphenate()) {
Index: xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java
===================================================================
RCS file: /home/cvspublic/xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java,v
retrieving revision 1.14
diff -w -u -r1.14 TextLayoutManager.java
--- xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java	4 Apr 2004 06:29:44 -0000	1.14
+++ xml-fop/src/java/org/apache/fop/layoutmgr/TextLayoutManager.java	5 Apr 2004 15:54:29 -0000
@@ -46,12 +46,14 @@
         private short iBreakIndex;
         private short iWScount;
         private MinOptMax ipdArea;
+        private boolean bHyphenated;
         public AreaInfo(short iSIndex, short iBIndex, short iWS,
-                 MinOptMax ipd) {
+                 MinOptMax ipd, boolean bHyph) {
             iStartIndex = iSIndex;
             iBreakIndex = iBIndex;
             iWScount = iWS;
             ipdArea = ipd;
+            bHyphenated = bHyph;
         }
     }
 
@@ -107,7 +109,7 @@
         // With CID fonts, space isn't neccesary currentFontState.width(32)
         spaceCharIPD = foText.textInfo.fs.getCharWidth(' ');
         // Use hyphenationChar property
-        hyphIPD = foText.textInfo.fs.getCharWidth('-');
+        hyphIPD = foText.textInfo.fs.getCharWidth(foText.textInfo.hyphChar);
         // Make half-space: <space> on either side of a word-space)
         SpaceVal ws = foText.textInfo.wordSpacing;
         halfWS = new SpaceVal(MinOptMax.multiply(ws.getSpace(), 0.5),
@@ -201,7 +203,7 @@
         boolean bCanHyphenate = true;
         int iStopIndex = iNextStart + hc.getNextHyphPoint();
 
-        if (textArray.length < iStopIndex || foText.textInfo.bCanHyphenate == false) {
+        if (textArray.length < iStopIndex) {
             iStopIndex = textArray.length;
             bCanHyphenate = false;
         }
@@ -396,7 +398,8 @@
 
         // Position is the index of the info for this word in the vector
         vecAreaInfo.add(
-          new AreaInfo(iWordStart, iNextStart, iWScount, ipd));
+          new AreaInfo(iWordStart, iNextStart, iWScount, ipd, 
+                       ((flags & BreakPoss.HYPHENATED) != 0)));
         BreakPoss bp = new BreakPoss(
                          new LeafPosition(this, vecAreaInfo.size() - 1));
         ipdTotal = ipd;
@@ -465,6 +468,20 @@
         if (ai == null) {
             return;
         }
+
+        // ignore newline character
+        int adjust = 0;
+        if (textArray[ai.iBreakIndex - 1] == NEWLINE) {
+            adjust = 1;
+        }
+        String str = new String(textArray, iStart, ai.iBreakIndex - iStart - adjust);
+
+        // add hyphenation character if the last word is hyphenated
+        if (ai.bHyphenated) {
+            str += foText.textInfo.hyphChar;
+            ai.ipdArea = MinOptMax.add(ai.ipdArea, new MinOptMax(hyphIPD));
+        }
+
         // Calculate total adjustment
         int iRealWidth = ai.ipdArea.opt;
         int iAdjust = 0;
@@ -482,13 +499,6 @@
 
         // Make an area containing all characters between start and end.
         InlineArea word = null;
-        int adjust = 0;
-        
-        // ignore newline character
-        if (textArray[ai.iBreakIndex - 1] == NEWLINE) {
-            adjust = 1;
-        }
-        String str = new String(textArray, iStart, ai.iBreakIndex - iStart - adjust);
 
         if (" ".equals(str)) {
             word = new Space();